From db79c0ae2988ec52f5009b904f8e56de74a66bc8 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Sat, 6 Nov 2021 19:35:06 +0100 Subject: [PATCH] add tests --- tests/test_settings.py | 9 +++++++++ tests/test_todoist.py | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/test_settings.py create mode 100644 tests/test_todoist.py diff --git a/tests/test_settings.py b/tests/test_settings.py new file mode 100644 index 0000000..f27819d --- /dev/null +++ b/tests/test_settings.py @@ -0,0 +1,9 @@ +import pytest +from todoist_interface import settings + + +def test_settings(): + config = settings.read_config("todoist_interface.yml.example") + assert (config["gitlab"]["token"] == "gitlabtoken" + and config["gitlab"]["url"] == "https://gitlab.example.com/api/v4/" + and config["todoist"]["token"] == "todoisttoken") diff --git a/tests/test_todoist.py b/tests/test_todoist.py new file mode 100644 index 0000000..a34eddf --- /dev/null +++ b/tests/test_todoist.py @@ -0,0 +1,7 @@ +import pytest +from todoist_interface.todoist import TodoistAPI + + +def test_todoist_init(): + todoist = TodoistAPI("1234") + assert todoist.token == "1234"