diff --git a/tests/test_mantishub.py b/tests/test_mantishub.py index ed3ade9..85e628d 100644 --- a/tests/test_mantishub.py +++ b/tests/test_mantishub.py @@ -1,3 +1,5 @@ +import json + from todoist_interface.mantishub import MantishubAPI @@ -12,5 +14,12 @@ def test_mantishub_get_tickets(): assert len(tickets) > 0 -def test_convert_to_todoist(): - assert False +def test_covert_to_todoist(example_tickets): + mantis = MantishubAPI("token") + issues = json.loads(example_tickets) + + tasks = mantis.convert_to_todoist(issues["issues"]) + assert tasks == [ + {'content': '[Sample issue title](https://contria.mantishub.io/view.php?id=1)', + 'label_ids': [2158784659]} + ]