payments.tests.integration package#
Submodules#
payments.tests.integration.01_member_actions module#
Tests for things a member is likely to do that uses payments
- class payments.tests.integration.01_member_actions.MemberTransfer(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Member transfer related activities.
These tests cover scenarios where a member transfers money to another member. This can trigger manual or auto top ups and different validation rules.
- a1_member_transfer_with_sufficient_funds()[source]#
Transfer to another member with sufficient funds in account
payments.tests.integration.02_payment_api_tests module#
- class payments.tests.integration.02_payment_api_tests.PaymentAPITests(manager: CobaltTestManagerIntegration)[source]#
Bases:
object
Unit tests for payment api functions. Assumes Alan has been set up for Auto top up by previous tests.
We use a mixture of unit tests (payment_api_batch) and integration tests (payment_api_interactive)
payments.tests.integration.common_functions module#
- payments.tests.integration.common_functions.check_balance_for_org(manager: CobaltTestManagerIntegration, org: Organisation, expected_balance=0, test_name=None, test_description=None)[source]#
Check and return balance
- payments.tests.integration.common_functions.check_balance_for_user(manager: CobaltTestManagerIntegration, user: User = None, expected_balance=0, test_name=None, test_description=None)[source]#
Check and return balance
- payments.tests.integration.common_functions.check_last_transaction_for_user(manager: CobaltTestManagerIntegration, user: User, tran_desc, tran_amt, test_name, other_member=None, test_description=None)[source]#
Check if last transaction is as expected
- payments.tests.integration.common_functions.set_balance_for_member(member: User, balance: float)[source]#
- payments.tests.integration.common_functions.set_balance_for_org(org: Organisation, balance: float)[source]#
- payments.tests.integration.common_functions.setup_auto_top_up(manager: CobaltTestManagerIntegration, user: User = None)[source]#
Selenium function to set up auto top up
- Parameters:
manager – test_manager.Manager object for interacting with system
user – User object representing user to set up (optional)
- payments.tests.integration.common_functions.stripe_manual_payment_screen(manager: CobaltTestManagerIntegration)[source]#
Enter details on manual payment screen to confirm payment