Compare commits

...

1 Commits
1.0.7 ... main

Author SHA1 Message Date
df1d08312f
Fix exception tests 2024-06-08 15:53:50 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ def test_lookup(test_dig):
with pytest.raises(ValueError) as e:
test_dig.lookup("what are you talking about")
assert e.startswith("Wrong IP or CIDR format")
assert str(e.value).startswith("Wrong IP or CIDR format")
def test_response_plain_print(test_dig, capsys):

View File

@ -83,4 +83,4 @@ def test_get_aws_ip_ranges_invalid_status(mocker, fs, create_cache_dir) -> None:
with pytest.raises(digaws.UnexpectedRequestException) as e:
digaws.get_aws_ip_ranges()
assert e.match("^Unexpected response from")
assert str(e.value).startswith("Unexpected response from")