We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48f12ca commit bc8bd22Copy full SHA for bc8bd22
tests/test_unknown_target.py
@@ -7,6 +7,7 @@
7
8
import pytest
9
from _pytest.fixtures import SubRequest
10
+from requests import codes
11
12
from vws import VWS
13
from vws.exceptions import UnknownTarget
@@ -53,5 +54,6 @@ def test_invalid_given_id(
53
54
causes an ``UnknownTarget`` exception to be raised.
55
"""
56
func = request.getfixturevalue(fixture)
- with pytest.raises(UnknownTarget):
57
+ with pytest.raises(UnknownTarget) as exc:
58
func(target_id='x')
59
+ assert exc.value.response.status_code == codes.NOT_FOUND
0 commit comments