diff options
Diffstat (limited to 'tests/tasks/test_receiver.py')
| -rw-r--r-- | tests/tasks/test_receiver.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/tasks/test_receiver.py b/tests/tasks/test_receiver.py index 102410d..c795115 100644 --- a/tests/tasks/test_receiver.py +++ b/tests/tasks/test_receiver.py @@ -688,8 +688,9 @@ def test_fetch_source_rejects_unsafe_destination( client = httpx_client.return_value.__enter__.return_value client.stream.side_effect = UnsafeAddressError("Local address") - with app.app_context(), pytest.raises( - receiver.VerificationError, match="non-public address" + with ( + app.app_context(), + pytest.raises(receiver.VerificationError, match="non-public address"), ): receiver.fetch_source(SOURCE_URL) @@ -700,8 +701,9 @@ def test_fetch_source_treats_dns_failure_as_temporary( ) -> None: client = httpx_client.return_value.__enter__.return_value client.stream.side_effect = AddressResolutionError("DNS timeout") - with app.app_context(), pytest.raises( - receiver.TemporaryFetchError, match="could not be resolved" + with ( + app.app_context(), + pytest.raises(receiver.TemporaryFetchError, match="could not be resolved"), ): receiver.fetch_source(SOURCE_URL) |
