# 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/tcontrol.py
# class TransferControl(PayStackBase):
#     """docstring for Transfer Control."""
# 
#     @classmethod
#     def check_balance(cls):
#         """
#         Check Balance.
# 
#         Args:
#             No argument required.
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.get('balance')
# 
#     @classmethod
#     def resend_otp(cls, **kwargs):
#         """
#         Resend OTP for Transfer.
# 
#         Args:
#             transfer_code: Transfer code
#             reason: either resend_otp or transfer
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/resend_otp', data=kwargs,)
#     
#     @classmethod
#     def disable_otp(cls):
#         """
#         Disable OTP requirement for Transfers
# 
#         Args:
#             No arguments required
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/disable_otp')
# 
#     @classmethod
#     def disable_otp_finalize(cls, **kwargs):
#         """
#         Finalize Disabling of OTP requirement for Transfers
# 
#         Args:
#             otp: OTP sent to business phone to verify disabling OTP requirement
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/disable_otp_finalize', data=kwargs,)
# 
#     @classmethod
#     def enable_otp(cls, **kwargs):
#         """
#         Enable OTP requirement for Transfers
# 
#         Args:
#             No arguments required
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/enable_otp', data=kwargs,)


import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.tcontrol import TransferControl

    @httpretty.activate
    def test_disable_otp_finalize(self):
        """Method defined to test disable_otp_finalize."""
        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/transfer/disable_otp_finalize"),
            content_type='text/json',
            body='{"status": true,\
                "message": "OTP requirement for transfers has been disabled"}',
            status=201,
        )

        response = TransferControl.disable_otp_finalize(
            otp="928783",
        )
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_enable_otp(self):
        """Method defined to test enable_otp."""
        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/transfer/enable_otp"),
            content_type='text/json',
            body='{"status": true,\
                "message": "OTP requirement for transfers has been enabled"}',
            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/tcontrol.py
# class TransferControl(PayStackBase):
#     """docstring for Transfer Control."""
# 
#     @classmethod
#     def check_balance(cls):
#         """
#         Check Balance.
# 
#         Args:
#             No argument required.
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.get('balance')
# 
#     @classmethod
#     def resend_otp(cls, **kwargs):
#         """
#         Resend OTP for Transfer.
# 
#         Args:
#             transfer_code: Transfer code
#             reason: either resend_otp or transfer
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/resend_otp', data=kwargs,)
#     
#     @classmethod
#     def disable_otp(cls):
#         """
#         Disable OTP requirement for Transfers
# 
#         Args:
#             No arguments required
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/disable_otp')
# 
#     @classmethod
#     def disable_otp_finalize(cls, **kwargs):
#         """
#         Finalize Disabling of OTP requirement for Transfers
# 
#         Args:
#             otp: OTP sent to business phone to verify disabling OTP requirement
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/disable_otp_finalize', data=kwargs,)
# 
#     @classmethod
#     def enable_otp(cls, **kwargs):
#         """
#         Enable OTP requirement for Transfers
# 
#         Args:
#             No arguments required
# 
#         Returns:
#             Json data from paystack API.
#         """
# 
#         return cls().requests.post('transfer/enable_otp', data=kwargs,)


# Path: paystackapi/tests/test_tcontrol.py
import httpretty
from paystackapi.tests.base_test_case import BaseTestCase
from paystackapi.tcontrol import TransferControl


    @httpretty.activate
    def test_disable_otp_finalize(self):
        """Method defined to test disable_otp_finalize."""
        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/transfer/disable_otp_finalize"),
            content_type='text/json',
            body='{"status": true,\
                "message": "OTP requirement for transfers has been disabled"}',
            status=201,
        )

        response = TransferControl.disable_otp_finalize(
            otp="928783",
        )
        self.assertTrue(response['status'])

    @httpretty.activate
    def test_enable_otp(self):
        """Method defined to test enable_otp."""
        httpretty.register_uri(
            httpretty.POST,
            self.endpoint_url("/transfer/enable_otp"),
            content_type='text/json',
            body='{"status": true,\
                "message": "OTP requirement for transfers has been enabled"}',
            status=201,
        )


        response = TransferControl.enable_otp()