Adds helpers and fixtures for transaction tests
This commit is contained in:
parent
06d9612c6c
commit
5d2e5013f3
32
apps/cic-ussd/tests/fixtures/accounts.py
vendored
32
apps/cic-ussd/tests/fixtures/accounts.py
vendored
@ -6,7 +6,7 @@ import pytest
|
||||
# local imports
|
||||
|
||||
# test imports
|
||||
from tests.helpers.accounts import phone_number, session_id
|
||||
from tests.helpers.accounts import given_name, family_name, phone_number, session_id
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
@ -39,6 +39,36 @@ def second_metadata_entry_session_id() -> str:
|
||||
return session_id()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def first_transaction_session_id() -> str:
|
||||
return session_id()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def second_transaction_session_id() -> str:
|
||||
return session_id()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def first_account_given_name() -> str:
|
||||
return given_name()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def second_account_given_name() -> str:
|
||||
return given_name()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def first_account_family_name() -> str:
|
||||
return family_name()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def second_account_family_name() -> str:
|
||||
return family_name()
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def gift_value(load_config):
|
||||
return load_config.get('TEST_GIFT_VALUE')
|
||||
|
@ -19,3 +19,11 @@ def phone_number() -> str:
|
||||
|
||||
def session_id() -> str:
|
||||
return uuid.uuid4().hex
|
||||
|
||||
|
||||
def given_name() -> str:
|
||||
return fake.first_name()
|
||||
|
||||
|
||||
def family_name() -> str:
|
||||
return fake.last_name()
|
||||
|
Loading…
Reference in New Issue
Block a user