Skip to content

Commit

Permalink
Add test for transfer control enable_otp
Browse files Browse the repository at this point in the history
  • Loading branch information
andela-sjames committed Sep 19, 2019
1 parent 810550f commit 08749b8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions paystackapi/tests/test_tcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,18 @@ def test_disable_otp_finalize(self):
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()
self.assertTrue(response['status'])

0 comments on commit 08749b8

Please sign in to comment.