forked from andela-sjames/paystack-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_settlement.py
More file actions
25 lines (20 loc) · 739 Bytes
/
test_settlement.py
File metadata and controls
25 lines (20 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.settlement import Settlement
class TestPage(BaseTestCase):
@httpretty.activate
def test_page_fetch(self):
"""Method defined to test fetch."""
httpretty.register_uri(
httpretty.GET,
self.endpoint_url("/settlement"),
content_type='text/json',
body='{"status": true, "message": "Settlements retrieved"}',
status=201,
)
response = Settlement.fetch(
start_date="2016-09-12T00:00:00.000Z",
end_date="2016-09-12T00:00:00.000Z",
subaccount="subaccount"
)
self.assertEqual(response['status'], True)