Skip to content

Commit

Permalink
Comment test crawl tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanglin-Tao committed May 13, 2024
1 parent 2334d0e commit 3e37530
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
16 changes: 3 additions & 13 deletions tests/test_crawl_tasks.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import pytest
import os
from src import *
from src.open_source_python_template.crawlTasks import get_tasks
from unittest.mock import patch, mock_open, MagicMock, PropertyMock
from google.oauth2.credentials import Credentials
from google.auth.transport.requests import Request
from google_auth_oauthlib.flow import InstalledAppFlow
from googleapiclient.discovery import build
from googleapiclient.errors import HttpError
from unittest.mock import patch, mock_open, MagicMock

# Sample data for mocking responses
MOCK_TASKS = {
Expand Down Expand Up @@ -77,10 +69,8 @@ def refresh(request):

# Setup Google API client mock
mock_service = mock_build.return_value
mock_tasklists = mock_service.tasklists().list().execute.return_value = (
MOCK_TASKLISTS
)
mock_tasks = mock_service.tasks().list().execute.return_value = MOCK_TASKS
mock_service.tasklists().list().execute.return_value = MOCK_TASKLISTS
mock_service.tasks().list().execute.return_value = MOCK_TASKS

# Execute function
results = get_tasks()
Expand Down
3 changes: 0 additions & 3 deletions tests/test_index.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import pytest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC


@pytest.fixture(scope="class")
Expand Down

0 comments on commit 3e37530

Please sign in to comment.