def test_totals(self):
        with mock.patch('paystackapi.transaction.Transaction.totals') as \
                mock_totals:
                mock_totals.return_value = {
                    'status': True
                }

                response = Transaction.totals()
                self.assertTrue(response['status'])
Example #2
0
    def test_totals(self):
        httpretty.register_uri(
            httpretty.GET,
            "https://api.paystack.co/transaction/totals",
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Transaction.totals()
        self.assertTrue(response['status'])
Example #3
0
    def test_totals(self):
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/transaction/totals"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Transaction.totals()
        self.assertTrue(response['status'])
    def test_totals(self):
        httpretty.register_uri(
            httpretty.GET,
            "https://api.paystack.co/transaction/totals",
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Transaction.totals()
        self.assertTrue(response['status'])