Adds fixtures for integration tests.

This commit is contained in:
PhilipWafula 2021-05-17 22:50:07 +03:00
parent f3e06dcd92
commit 30eb9f517b
Signed by untrusted user: mango-habanero
GPG Key ID: B00CE9034DA19FB7

View File

@ -1,12 +1,17 @@
# standard imports
# external imports
import pytest
from faker import Faker
# local imports
# test imports
from tests.helpers.accounts import given_name, family_name, phone_number, session_id
from tests.helpers.accounts import phone_number, pin_number, session_id
fake = Faker()
@pytest.fixture(scope='function')
@ -29,6 +34,16 @@ def second_account_phone_number() -> str:
return phone_number()
@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()
@pytest.fixture(scope='session')
def first_metadata_entry_session_id() -> str:
return session_id()
@ -51,22 +66,52 @@ def second_transaction_session_id() -> str:
@pytest.fixture(scope='session')
def first_account_given_name() -> str:
return given_name()
return fake.first_name()
@pytest.fixture(scope='session')
def second_account_given_name() -> str:
return given_name()
return fake.first_name()
@pytest.fixture(scope='session')
def first_account_family_name() -> str:
return family_name()
return fake.last_name()
@pytest.fixture(scope='session')
def second_account_family_name() -> str:
return family_name()
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')