# 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/settlement.py
# class Settlement(PayStackBase):
#     """docstring for settlement."""
# 
#     @classmethod
#     def fetch(cls, **kwargs):
#         """
#         Function defined to fetch settlement.
# 
#         Args:
#             from: Lower bound of date range. 
#                   Leave undefined to export settlement from day one.
#             to: Upper bound of date range. 
#                 Leave undefined to export settlements till date.
#             subaccount: code to export only settlements for that subaccount. 
#                         Set to none to export only transactions for the account.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get("settlement", qs=kwargs)


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,
        )


# 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/settlement.py
# class Settlement(PayStackBase):
#     """docstring for settlement."""
# 
#     @classmethod
#     def fetch(cls, **kwargs):
#         """
#         Function defined to fetch settlement.
# 
#         Args:
#             from: Lower bound of date range. 
#                   Leave undefined to export settlement from day one.
#             to: Upper bound of date range. 
#                 Leave undefined to export settlements till date.
#             subaccount: code to export only settlements for that subaccount. 
#                         Set to none to export only transactions for the account.
# 
#         Returns:
#             Json data from paystack API.
#         """
#         return cls().requests.get("settlement", qs=kwargs)


# Path: paystackapi/tests/test_settlement.py
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(