GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

TestPaystackClass   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_transaction_init() 0 13 1
1
"""Script defined to test the paystack class."""
2
3
4
import unittest
5
import httpretty
6
7
from paystackapi.paystack import Paystack
8
paystack_secret_key = "sk_test_0a246ef179dc841f42d20959bebdd790f69605d8"
9
paystack = Paystack(secret_key=paystack_secret_key)
10
11
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