mirror of
https://github.com/dcarrillo/digaws.git
synced 2024-11-15 01:11:13 +00:00
Fix exception tests
This commit is contained in:
parent
a90dbd0123
commit
df1d08312f
@ -97,7 +97,7 @@ def test_lookup(test_dig):
|
|||||||
|
|
||||||
with pytest.raises(ValueError) as e:
|
with pytest.raises(ValueError) as e:
|
||||||
test_dig.lookup("what are you talking about")
|
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):
|
def test_response_plain_print(test_dig, capsys):
|
||||||
|
@ -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:
|
with pytest.raises(digaws.UnexpectedRequestException) as e:
|
||||||
digaws.get_aws_ip_ranges()
|
digaws.get_aws_ip_ranges()
|
||||||
|
|
||||||
assert e.match("^Unexpected response from")
|
assert str(e.value).startswith("Unexpected response from")
|
||||||
|
Loading…
Reference in New Issue
Block a user