Skip to content

Commit ef780ad

Browse files
author
Kevin Hellemun
committed
Added test to ensure that response id retrieval at request failure passes. (#59)
1 parent a727616 commit ef780ad

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from bunq.sdk.exception import BadRequestException
2+
from bunq.sdk.model.generated.endpoint import UserPerson
3+
from tests.bunq_test import BunqSdkTestCase
4+
5+
6+
class TestPagination(BunqSdkTestCase):
7+
8+
_INVALID_USER_PERSON_ID = 0
9+
10+
def test_bad_request_with_response_id(self):
11+
caught_exception = None
12+
13+
try:
14+
UserPerson.get(
15+
self._get_api_context(),
16+
self._INVALID_USER_PERSON_ID
17+
)
18+
except BadRequestException as exception:
19+
caught_exception = exception
20+
21+
self.assertIsNotNone(caught_exception)
22+
self.assertIsNotNone(caught_exception.response_id)

0 commit comments

Comments
 (0)