Adds helpers and fixtures for transaction tests

This commit is contained in:
PhilipWafula 2021-05-17 16:00:06 +03:00
parent 06d9612c6c
commit 5d2e5013f3
Signed by untrusted user: mango-habanero
GPG Key ID: B00CE9034DA19FB7
2 changed files with 39 additions and 1 deletions

View File

@ -6,7 +6,7 @@ import pytest
# local imports # local imports
# test 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') @pytest.fixture(scope='function')
@ -39,6 +39,36 @@ def second_metadata_entry_session_id() -> str:
return session_id() 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') @pytest.fixture(scope='session')
def gift_value(load_config): def gift_value(load_config):
return load_config.get('TEST_GIFT_VALUE') return load_config.get('TEST_GIFT_VALUE')

View File

@ -19,3 +19,11 @@ def phone_number() -> str:
def session_id() -> str: def session_id() -> str:
return uuid.uuid4().hex return uuid.uuid4().hex
def given_name() -> str:
return fake.first_name()
def family_name() -> str:
return fake.last_name()