Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Nov 17, 2023
1 parent ddead22 commit 2ddee9b
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ def test_checkin_another_user(


class TestWorkerRequestedTasks:
new_ip_address = "88.88.88.88"

def test_requested_task_worker_as_admin(self, client, access_token, worker):
response = client.get(
"/requested-tasks/worker",
Expand All @@ -240,13 +238,6 @@ def test_requested_task_worker_as_worker(self, client, make_access_token, worker
)
assert response.status_code == 200

def custom_ip_update(self, ip_addresses: List):
self.ip_updated = True
assert TestWorkerRequestedTasks.new_ip_address in ip_addresses

def custom_failing_ip_update(self, ip_addresses: List):
raise Exception()

@pytest.mark.parametrize(
"prev_ip, new_ip, external_update_enabled, external_update_fails,"
" external_update_called",
Expand Down Expand Up @@ -295,7 +286,7 @@ def test_requested_task_worker_update_ip_whitelist(

# setup custom ip updater to intercept Wasabi operations
updater = IpUpdaterAndChecker(should_fail=external_update_fails)
assert TestWorkerRequestedTasks.new_ip_address not in updater.ip_addresses
assert new_ip not in updater.ip_addresses
ExternalIpUpdater.update = updater.ip_update
constants.USES_WORKERS_IPS_WHITELIST = external_update_enabled

Expand Down

0 comments on commit 2ddee9b

Please sign in to comment.