-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added card details verification method - Added tests that support the method - No major/minor patch on any of the other methods
- Loading branch information
1 parent
348e9d9
commit 7e3a3a1
Showing
4 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
python_flutterwave/tests/test_verify_bank_account_details.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import os | ||
import unittest | ||
from python_flutterwave import payment | ||
|
||
|
||
class TestVerifyBankAccountDetails(unittest.TestCase): | ||
def setUp(self) -> None: | ||
self.token = os.environ.get("SECRET_KEY") | ||
self.account_number = "0690000032" | ||
self.account_bank = "044" | ||
|
||
payment.token = self.token | ||
self.details = payment.verify_bank_account_details(account_bank=self.account_bank, | ||
account_number=self.account_number) | ||
|
||
def tearDown(self) -> None: | ||
pass | ||
|
||
def test_argument_types(self): | ||
self.assertIsInstance(self.token, str) | ||
self.assertIsInstance(self.account_number, str) | ||
self.assertIsInstance(self.account_bank, str) | ||
|
||
def test_mandatory_args(self): | ||
self.assertIsNot(self.token, "") | ||
self.assertIsNot(self.account_bank, "") | ||
self.assertIsNot(self.account_number, "") | ||
|
||
def test_return_obj(self): | ||
self.assertIsInstance(self.details, dict) | ||
self.assertIsNotNone(self.details) | ||
self.assertIn("status", self.details.keys()) | ||
self.assertIn("message", self.details.keys()) | ||
self.assertIn("data", self.details.keys()) | ||
self.assertNotEqual(self.details["status"], "error") | ||
self.assertNotEqual(self.details["data"], "null") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = python-flutterwave | ||
version = 0.3.8 | ||
version = 0.4.8 | ||
author = William Otieno | ||
author_email = [email protected] | ||
description = Python Wrapper for interacting with the Flutterwave Payments API | ||
|