some changes

This commit is contained in:
Andreas Zweili 2021-11-08 15:50:16 +01:00
parent ab5ae1509f
commit d1d0e42b95
4 changed files with 5 additions and 25 deletions

View File

@ -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
}

View File

@ -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, ]
}))

View File

@ -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"

0
tests/test_mantishub.py Normal file
View File