Skip to content

Commit 38dbd22

Browse files
committed
tests: check the exception raised in testGMPResponseWithSigningAutographPermanentFailure
Ensure the exception we're getting is what we expected.
1 parent 5bea5d5 commit 38dbd22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/web/test_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,9 +1374,12 @@ def testGMPResponseWithSigningAutographTempFailure(self, mocked_make_hash):
13741374
def testGMPResponseWithSigningAutographPermanentFailure(self):
13751375
global mock_autograph_exception_count
13761376
mock_autograph_exception_count = 3
1377-
with pytest.raises(Exception):
1377+
with pytest.raises(Exception) as excinfo:
13781378
self.client.get("/update/4/gmp/1.0/1/p/l/a/a/a/a/1/update.xml")
13791379

1380+
assert excinfo.type is Exception
1381+
assert excinfo.value.args == ("unable to contact autograph",)
1382+
13801383
def testGetWithResponseProducts(self):
13811384
ret = self.client.get("/update/4/gmp/1.0/1/p/l/a/a/a/a/1/update.xml")
13821385
self.assertUpdateEqual(

0 commit comments

Comments
 (0)