| Total Complexity | 1 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """Script defined to test the paystack class.""" |
||
| 12 | class TestPaystackClass(unittest.TestCase): |
||
| 13 | """Method defined to test paystack class.""" |
||
| 14 | |||
| 15 | @httpretty.activate |
||
| 16 | def test_transaction_init(self): |
||
| 17 | """Function defined to test dynamic class use.""" |
||
| 18 | httpretty.register_uri( |
||
| 19 | httpretty.GET, |
||
| 20 | "https://api.paystack.co/transaction", |
||
| 21 | content_type='text/json', |
||
| 22 | body='{"status": true, "contributors": true}', |
||
| 23 | status=201, |
||
| 24 | ) |
||
| 25 | |||
| 26 | response = paystack.transaction.list() |
||
| 27 | self.assertTrue(response['status']) |
||
| 28 |