From 340fe4d75ee970ecbf189a011f9b36b948f19661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Cl=C3=A9net?= Date: Fri, 29 Sep 2023 11:41:22 +0200 Subject: [PATCH] [TEST] adjusting tests --- tests/utils/test_status.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/utils/test_status.py b/tests/utils/test_status.py index 42f9f584..17170b71 100644 --- a/tests/utils/test_status.py +++ b/tests/utils/test_status.py @@ -108,9 +108,12 @@ def mocked_requests_get_4(url, params=None, **kwargs): if 'issues' not in url: def mocked_json(): return mocked_repo_info_4 - else: + elif '?page=1' in url: def mocked_json(): return mocked_issues_4 + else: + def mocked_json(): + return [] response.json = mocked_json return response @@ -189,7 +192,6 @@ def test_get_issues(mocker): # General usecase 4 issues mocker.patch('narps_open.utils.status.get', side_effect = mocked_requests_get_4) - issues = get_opened_issues() assert len(issues) == 4 assert issues[0]['html_url'] == 'url_issue_2'