File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1- from bunq .sdk .exception import BadRequestException
1+ from bunq .sdk .exception import ApiException
22from bunq .sdk .model .generated .endpoint import UserPerson
33from tests .bunq_test import BunqSdkTestCase
44
@@ -15,15 +15,12 @@ def test_bad_request_with_response_id(self):
1515 """
1616 """
1717
18- caught_exception = None
19-
20- try :
18+ with self .assertRaises (ApiException ) as caught_exception :
2119 UserPerson .get (
2220 self ._get_api_context (),
2321 self ._INVALID_USER_PERSON_ID
2422 )
25- except BadRequestException as exception :
26- caught_exception = exception
2723
2824 self .assertIsNotNone (caught_exception )
29- self .assertIsNotNone (caught_exception .response_id )
25+ self .assertIsNotNone (caught_exception .exception )
26+ self .assertIsNotNone (caught_exception .exception .response_id )
You can’t perform that action at this time.
0 commit comments