Skip to content

Commit

Permalink
make pipeline pass
Browse files Browse the repository at this point in the history
  • Loading branch information
kris524 committed Oct 28, 2023
1 parent 853cbde commit 879625f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions notion_to_google_task_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@

load_dotenv()
NOTION_ID = os.getenv("NOTION_KEY")
# if NOTION_ID is None:
# raise KeyError("Missing NOTION ID environment variable")
if NOTION_ID is None:
raise KeyError("Missing NOTION ID environment variable")
SCOPES = ["https://www.googleapis.com/auth/tasks"]

r = redis.Redis(host="localhost", port=6379, decode_responses=True)

class MockClient:
def __init__(self) -> None:
client = Client()

# -----------------
# NOTION FUNCTIONS
Expand Down
3 changes: 2 additions & 1 deletion test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@


class TestNotionFunctions(unittest.TestCase):
@patch("notion_to_google_task_sync.Client")

@patch("notion_to_google_task_sync.MockClient")
def test_get_all_pages(self, mock_client):
"""Test correct ids are collected"""
mock_search = Mock()
Expand Down

0 comments on commit 879625f

Please sign in to comment.