@@ -155,7 +155,7 @@ def test_read_version(anon_client):
155
155
156
156
def test_read_heartbeat_all_services_fail (anon_client , mocked_jira , mocked_bugzilla ):
157
157
"""/__heartbeat__ returns 503 when all the services are unavailable."""
158
- mocked_bugzilla .logged_in = False
158
+ mocked_bugzilla .logged_in . return_value = False
159
159
mocked_jira .get_server_info .return_value = None
160
160
161
161
resp = anon_client .get ("/__heartbeat__" )
@@ -193,7 +193,7 @@ def test_read_heartbeat_jira_services_fails(anon_client, mocked_jira, mocked_bug
193
193
def test_read_heartbeat_bugzilla_webhooks_fails (
194
194
anon_client , mocked_jira , mocked_bugzilla
195
195
):
196
- mocked_bugzilla .logged_in = True
196
+ mocked_bugzilla .logged_in . return_value = True
197
197
mocked_bugzilla .list_webhooks .return_value = [
198
198
EXAMPLE_WEBHOOK .copy (update = {"enabled" : False })
199
199
]
@@ -211,7 +211,7 @@ def test_read_heartbeat_bugzilla_services_fails(
211
211
anon_client , mocked_jira , mocked_bugzilla
212
212
):
213
213
"""/__heartbeat__ returns 503 when one service is unavailable."""
214
- mocked_bugzilla .logged_in = False
214
+ mocked_bugzilla .logged_in . return_value = False
215
215
mocked_jira .get_server_info .return_value = {}
216
216
mocked_jira .projects .return_value = [{"key" : "DevTest" }]
217
217
@@ -226,7 +226,7 @@ def test_read_heartbeat_bugzilla_services_fails(
226
226
227
227
def test_read_heartbeat_success (anon_client , mocked_jira , mocked_bugzilla ):
228
228
"""/__heartbeat__ returns 200 when checks succeed."""
229
- mocked_bugzilla .logged_in = True
229
+ mocked_bugzilla .logged_in . return_value = True
230
230
mocked_bugzilla .list_webhooks .return_value = [EXAMPLE_WEBHOOK ]
231
231
mocked_jira .get_server_info .return_value = {}
232
232
mocked_jira .projects .return_value = [{"key" : "DevTest" }]
@@ -297,7 +297,7 @@ def test_jira_heartbeat_missing_permissions(anon_client, mocked_jira, mocked_bug
297
297
298
298
299
299
def test_jira_heartbeat_unknown_components (anon_client , mocked_jira , mocked_bugzilla ):
300
- mocked_bugzilla .logged_in = True
300
+ mocked_bugzilla .logged_in . return_value = True
301
301
mocked_bugzilla .list_webhooks .return_value = [EXAMPLE_WEBHOOK ]
302
302
mocked_jira .get_server_info .return_value = {}
303
303
@@ -309,7 +309,7 @@ def test_jira_heartbeat_unknown_components(anon_client, mocked_jira, mocked_bugz
309
309
310
310
def test_head_heartbeat_success (anon_client , mocked_jira , mocked_bugzilla ):
311
311
"""/__heartbeat__ support head requests"""
312
- mocked_bugzilla .logged_in = True
312
+ mocked_bugzilla .logged_in . return_value = True
313
313
mocked_bugzilla .list_webhooks .return_value = [EXAMPLE_WEBHOOK ]
314
314
mocked_jira .get_server_info .return_value = {}
315
315
mocked_jira .projects .return_value = [{"key" : "DevTest" }]
0 commit comments