Skip to content

Commit

Permalink
[TEST] adjusting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bclenet committed Sep 29, 2023
1 parent 4050404 commit 340fe4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/utils/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit 340fe4d

Please sign in to comment.