Skip to content

Commit bc8bd22

Browse files
committed
Make assertion about status code
1 parent 48f12ca commit bc8bd22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_unknown_target.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import pytest
99
from _pytest.fixtures import SubRequest
10+
from requests import codes
1011

1112
from vws import VWS
1213
from vws.exceptions import UnknownTarget
@@ -53,5 +54,6 @@ def test_invalid_given_id(
5354
causes an ``UnknownTarget`` exception to be raised.
5455
"""
5556
func = request.getfixturevalue(fixture)
56-
with pytest.raises(UnknownTarget):
57+
with pytest.raises(UnknownTarget) as exc:
5758
func(target_id='x')
59+
assert exc.value.response.status_code == codes.NOT_FOUND

0 commit comments

Comments
 (0)