We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a0cb065 + 7c6a9e8 commit 0610168Copy full SHA for 0610168
1 file changed
tests/test_exceptions.py
@@ -119,9 +119,11 @@ def test_bad_image(client: VWS) -> None:
119
A ``BadImage`` exception is raised when a non-image is given.
120
"""
121
not_an_image = io.BytesIO(b'Not an image')
122
- with pytest.raises(BadImage):
+ with pytest.raises(BadImage) as exc:
123
client.add_target(name='x', width=1, image=not_an_image)
124
125
+ assert exc.value.response.status_code == codes.UNPROCESSABLE_ENTITY
126
+
127
128
def test_target_name_exist(
129
client: VWS,
0 commit comments