UT: Rename test_control_find_server_any_exception -> test_control_find_server__no_available_relays

This commit is contained in:
Shreya Malviya 2022-09-07 18:00:08 +05:30 committed by Mike Salvatore
parent a39917d9aa
commit f847757a9a
1 changed files with 2 additions and 4 deletions

View File

@ -43,14 +43,12 @@ def test_control_set_proxies(monkeypatch, is_windows_os, expected_proxy_string):
assert control_client.proxies["https"] == expected_proxy_string assert control_client.proxies["https"] == expected_proxy_string
def test_control_find_server_any_exception(monkeypatch, servers): def test_control_find_server__no_available_relays(monkeypatch, servers):
monkeypatch.setattr("infection_monkey.control.requests.get", MockConnectionError) monkeypatch.setattr("infection_monkey.control.requests.get", MockConnectionError)
cc = ControlClient(servers) cc = ControlClient(servers)
return_value = cc.find_server(servers) assert cc.find_server(servers) is False
assert return_value is False
assert servers == [] assert servers == []