cic-internal-integration/apps/cic-ussd/tests/fixtures/accounts.py

130 lines
2.5 KiB
Python
Raw Normal View History

2021-05-14 09:27:20 +02:00
# standard imports
# external imports
2021-05-17 21:50:07 +02:00
2021-05-14 09:27:20 +02:00
import pytest
2021-05-17 21:50:07 +02:00
from faker import Faker
2021-05-14 09:27:20 +02:00
# local imports
# test imports
2021-05-17 21:50:07 +02:00
from tests.helpers.accounts import phone_number, pin_number, session_id
fake = Faker()
2021-05-14 09:27:20 +02:00
@pytest.fixture(scope='function')
def generate_phone_number() -> str:
return phone_number()
@pytest.fixture(scope='function')
def generate_session_id() -> str:
return session_id()
@pytest.fixture(scope='session')
def first_account_phone_number() -> str:
return phone_number()
@pytest.fixture(scope='session')
def second_account_phone_number() -> str:
return phone_number()
2021-05-17 21:50:07 +02:00
@pytest.fixture(scope='session')
def first_account_pin_number() -> str:
return pin_number()
@pytest.fixture(scope='session')
def second_account_pin_number() -> str:
return pin_number()
2021-05-14 09:27:20 +02:00
@pytest.fixture(scope='session')
def first_metadata_entry_session_id() -> str:
return session_id()
@pytest.fixture(scope='session')
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:
2021-05-17 21:50:07 +02:00
return fake.first_name()
@pytest.fixture(scope='session')
def second_account_given_name() -> str:
2021-05-17 21:50:07 +02:00
return fake.first_name()
@pytest.fixture(scope='session')
def first_account_family_name() -> str:
2021-05-17 21:50:07 +02:00
return fake.last_name()
@pytest.fixture(scope='session')
def second_account_family_name() -> str:
2021-05-17 21:50:07 +02:00
return fake.last_name()
@pytest.fixture(scope='session')
def first_account_location() -> str:
return fake.city()
@pytest.fixture(scope='session')
def second_account_location() -> str:
return fake.city()
@pytest.fixture(scope='session')
def first_account_product() -> str:
return fake.job()
@pytest.fixture(scope='session')
def second_account_product() -> str:
return fake.job()
@pytest.fixture(scope='session')
def first_account_verify_balance_session_id() -> str:
return session_id()
@pytest.fixture(scope='session')
def second_account_verify_balance_session_id() -> str:
return session_id()
@pytest.fixture(scope='session')
def gift_value(load_config):
return load_config.get('TEST_GIFT_VALUE')
@pytest.fixture(scope='session')
def server_url(load_config):
return load_config.get('TEST_SERVER_URL')
@pytest.fixture(scope='session')
def token_symbol(load_config):
return load_config.get('TEST_TOKEN_SYMBOL')