# Path: paystackapi/subscription.py
# class Subscription(PayStackBase):
#     """docstring for Subscription."""
# 
#     @classmethod
#     def create(cls, **kwargs):
#         """
#         Create subscription.
# 
#         Args:
#             customer: Customer's email address or customer code
#             plan: Plan code
#             authorization: customers authorization code
#             start_date:  the date for the first debit. (ISO 8601 format)
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('subscription', data=kwargs)
# 
#     @classmethod
#     def list(cls):
#         """
#         List subscriptions.
# 
#         Args:
#             No argument required.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get('subscription')
# 
#     @classmethod
#     def disable(cls, **kwargs):
#         """
#         Disables subscription
#         Args:
#             code: Subscription code
#             token: Email token
#         returns:
#             Json data from paystack API
#         """
#         return cls().requests.post('subscription/disable', data=kwargs)
# 
#     @classmethod
#     def enable(cls, **kwargs):
#         """
#         Disables subscription
# 
#         Args:
#             code: Subscription code
#             token: Email token
# 
#         returns:
#             Json data from paystack API
#         """
#         return cls().requests.post('subscription/enable', data=kwargs)
# 
#     @classmethod
#     def fetch(cls, subscription_id):
#         """
#         Fetch subscription.
# 
#         Args:
#             subscription_id: subscription id.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get(f"subscription/{subscription_id}")
# 
# Path: paystackapi/tests/base_test_case.py
# class BaseTestCase(unittest.TestCase):
# 		
# 	def endpoint_url(self, path):
# 		if path[0] == '/':
# 			return 'https://api.paystack.co{}'.format(path)
# 		return 'https://api.paystack.co/{}'.format(path)


import httpretty
from paystackapi.subscription import Subscription
from paystackapi.tests.base_test_case import BaseTestCase
            plan = 'Pln_2yudUnIds2p',
            authorization = '34'
        )
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_fetch(self):
        """Function defined to test Subscription fetch method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/subscription/4013"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Subscription.fetch(subscription_id=4013)
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_list(self):
        """Function defined to test paystackapi subscription list method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/subscription"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )


# Path: paystackapi/subscription.py
# class Subscription(PayStackBase):
#     """docstring for Subscription."""
# 
#     @classmethod
#     def create(cls, **kwargs):
#         """
#         Create subscription.
# 
#         Args:
#             customer: Customer's email address or customer code
#             plan: Plan code
#             authorization: customers authorization code
#             start_date:  the date for the first debit. (ISO 8601 format)
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.post('subscription', data=kwargs)
# 
#     @classmethod
#     def list(cls):
#         """
#         List subscriptions.
# 
#         Args:
#             No argument required.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get('subscription')
# 
#     @classmethod
#     def disable(cls, **kwargs):
#         """
#         Disables subscription
#         Args:
#             code: Subscription code
#             token: Email token
#         returns:
#             Json data from paystack API
#         """
#         return cls().requests.post('subscription/disable', data=kwargs)
# 
#     @classmethod
#     def enable(cls, **kwargs):
#         """
#         Disables subscription
# 
#         Args:
#             code: Subscription code
#             token: Email token
# 
#         returns:
#             Json data from paystack API
#         """
#         return cls().requests.post('subscription/enable', data=kwargs)
# 
#     @classmethod
#     def fetch(cls, subscription_id):
#         """
#         Fetch subscription.
# 
#         Args:
#             subscription_id: subscription id.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get(f"subscription/{subscription_id}")
# 
# Path: paystackapi/tests/base_test_case.py
# class BaseTestCase(unittest.TestCase):
# 		
# 	def endpoint_url(self, path):
# 		if path[0] == '/':
# 			return 'https://api.paystack.co{}'.format(path)
# 		return 'https://api.paystack.co/{}'.format(path)


# Path: paystackapi/tests/test_subscription.py
import httpretty
from paystackapi.subscription import Subscription
from paystackapi.tests.base_test_case import BaseTestCase

            plan = 'Pln_2yudUnIds2p',
            authorization = '34'
        )
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_fetch(self):
        """Function defined to test Subscription fetch method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/subscription/4013"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )

        response = Subscription.fetch(subscription_id=4013)
        self.assertEqual(response['status'], True)

    @httpretty.activate
    def test_list(self):
        """Function defined to test paystackapi subscription list method."""
        httpretty.register_uri(
            httpretty.GET,
            self.endpoint_url("/subscription"),
            content_type='text/json',
            body='{"status": true, "contributors": true}',
            status=201,
        )


        response = Subscription.list()