|
| 1 | +import unittest |
| 2 | +from Adyen import checkout |
| 3 | + |
| 4 | + |
| 5 | +class TestClassicCheckoutSDKApi(unittest.TestCase): |
| 6 | + client = checkout.classic_checkout_sdk_api |
| 7 | + |
| 8 | + def test_payment_session(self): |
| 9 | + self.assertIsNotNone(self.client.payment_session) |
| 10 | + |
| 11 | + def test_verify_payment_result(self): |
| 12 | + self.assertIsNotNone(self.client.verify_payment_result) |
| 13 | + |
| 14 | + |
| 15 | +class TestModificationsApi(unittest.TestCase): |
| 16 | + client = checkout.modifications_api |
| 17 | + |
| 18 | + def test_cancel_authorised_payment(self): |
| 19 | + self.assertIsNotNone(self.client.cancel_authorised_payment) |
| 20 | + |
| 21 | + def test_update_authorised_amount(self): |
| 22 | + self.assertIsNotNone(self.client.update_authorised_amount) |
| 23 | + |
| 24 | + def test_cancel_authorised_payment_by_psp_reference(self): |
| 25 | + self.assertIsNotNone(self.client.cancel_authorised_payment_by_psp_reference) |
| 26 | + |
| 27 | + def test_capture_authorised_payment(self): |
| 28 | + self.assertIsNotNone(self.client.capture_authorised_payment) |
| 29 | + |
| 30 | + def test_refund_captured_payment(self): |
| 31 | + self.assertIsNotNone(self.client.refund_captured_payment) |
| 32 | + |
| 33 | + def test_refund_or_cancel_payment(self): |
| 34 | + self.assertIsNotNone(self.client.refund_or_cancel_payment) |
| 35 | + |
| 36 | + |
| 37 | +class TestOrdersApi(unittest.TestCase): |
| 38 | + client = checkout.orders_api |
| 39 | + |
| 40 | + def test_orders(self): |
| 41 | + self.assertIsNotNone(self.client.orders) |
| 42 | + |
| 43 | + def test_cancel_order(self): |
| 44 | + self.assertIsNotNone(self.client.cancel_order) |
| 45 | + |
| 46 | + def test_get_balance_of_gift_card(self): |
| 47 | + self.assertIsNotNone(self.client.get_balance_of_gift_card) |
| 48 | + |
| 49 | + |
| 50 | +class TestPaymentLinksApi(unittest.TestCase): |
| 51 | + client = checkout.payment_links_api |
| 52 | + |
| 53 | + def test_get_payment_link(self): |
| 54 | + self.assertIsNotNone(self.client.get_payment_link) |
| 55 | + |
| 56 | + def test_update_payment_link(self): |
| 57 | + self.assertIsNotNone(self.client.update_payment_link) |
| 58 | + |
| 59 | + def test_payment_links(self): |
| 60 | + self.assertIsNotNone(self.client.payment_links) |
| 61 | + |
| 62 | + |
| 63 | +class TestPaymentsApi(unittest.TestCase): |
| 64 | + client = checkout.payments_api |
| 65 | + |
| 66 | + def test_card_details(self): |
| 67 | + self.assertIsNotNone(self.client.card_details) |
| 68 | + |
| 69 | + def test_donations(self): |
| 70 | + self.assertIsNotNone(self.client.donations) |
| 71 | + |
| 72 | + def test_payment_methods(self): |
| 73 | + self.assertIsNotNone(self.client.payment_methods) |
| 74 | + |
| 75 | + def test_payments(self): |
| 76 | + self.assertIsNotNone(self.client.payments) |
| 77 | + |
| 78 | + def test_payments_details(self): |
| 79 | + self.assertIsNotNone(self.client.payments_details) |
| 80 | + |
| 81 | + def test_sessions(self): |
| 82 | + self.assertIsNotNone(self.client.sessions) |
| 83 | + |
| 84 | + |
| 85 | +class TestRecurringApi(unittest.TestCase): |
| 86 | + client = checkout.recurring_api |
| 87 | + |
| 88 | + def test_delete_token_for_stored_payment_details(self): |
| 89 | + self.assertIsNotNone(self.client.delete_token_for_stored_payment_details) |
| 90 | + |
| 91 | + def test_get_tokens_for_stored_payment_details(self): |
| 92 | + self.assertIsNotNone(self.client.get_tokens_for_stored_payment_details) |
| 93 | + |
| 94 | + |
| 95 | +class TestUtilityApi(unittest.TestCase): |
| 96 | + client = checkout.utility_api |
| 97 | + |
| 98 | + def test_get_apple_pay_session(self): |
| 99 | + self.assertIsNotNone(self.client.get_apple_pay_session) |
| 100 | + |
| 101 | + def test_origin_keys(self): |
| 102 | + self.assertIsNotNone(self.client.origin_keys) |
| 103 | + |
| 104 | + |
0 commit comments