From d1d0e42b95d512fd64a6fd377e368886bce188cd Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Mon, 8 Nov 2021 15:50:16 +0100 Subject: [PATCH] some changes --- .vscode/settings.json | 5 ++++- test_apis.py | 23 ----------------------- tests/test_gitlab.py | 2 +- tests/test_mantishub.py | 0 4 files changed, 5 insertions(+), 25 deletions(-) delete mode 100644 test_apis.py create mode 100644 tests/test_mantishub.py diff --git a/.vscode/settings.json b/.vscode/settings.json index 05802b0..fc47856 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,8 @@ { "python.pythonPath": "venv/bin/python", "python.linting.flake8Enabled": true, - "python.linting.enabled": true + "python.linting.enabled": true, + "python.testing.pytestArgs": ["tests/"], + "python.testing.unittestEnabled": false, + "python.testing.pytestEnabled": true } diff --git a/test_apis.py b/test_apis.py deleted file mode 100644 index bb3203b..0000000 --- a/test_apis.py +++ /dev/null @@ -1,23 +0,0 @@ -import json -import requests -import uuid - -if __name__ == '__main__': - # tasks = requests.get( - # "https://api.todoist.com/rest/v1/labels", - # headers={ - # "Authorization": "Bearer f1d6ff420068f4323077ff3ce500d39e09713a27" - # }).json() - - # print(tasks) - requests.post("https://api.todoist.com/rest/v1/tasks", - headers={ - "Content-Type": "application/json", - "X-Request-Id": str(uuid.uuid4()), - "Authorization": "Bearer f1d6ff420068f4323077ff3ce500d39e09713a27" - }, - data=json.dumps({ - "content": "foo", - "description": "bar", - "label_id": [2158782094, ] - })) diff --git a/tests/test_gitlab.py b/tests/test_gitlab.py index 409c08e..ee1b0b7 100644 --- a/tests/test_gitlab.py +++ b/tests/test_gitlab.py @@ -2,5 +2,5 @@ from todoist_interface.gitlab import GitlabAPI def test_gitlab_init(): - gitlab = GitlabAPI("url", "token") + gitlab = GitlabAPI("url", "token", "assignee") assert gitlab.url == "url" and gitlab.token == "token" diff --git a/tests/test_mantishub.py b/tests/test_mantishub.py new file mode 100644 index 0000000..e69de29