Пример #1
0
def before_scenario(context, _):
    """Scenario-level setup."""
    account = add_account(context.db, password="******")
    context.accounts = dict(foobar=account)
    acct_activity_repository = AccountActivityRepository(context.db)
    context.account_activity = acct_activity_repository.get_activity_by_date(
        datetime.utcnow().date()
    )
Пример #2
0
def before_scenario(context, _):
    """Setup data that could change during a scenario so each test starts clean."""
    account = add_account(context.db)
    context.accounts = dict(foo=account)
    context.geography_id = add_account_geography(context.db, account)
    context.voice = add_text_to_speech(context.db)
    acct_activity_repository = AccountActivityRepository(context.db)
    context.account_activity = acct_activity_repository.get_activity_by_date(
        datetime.utcnow().date())
Пример #3
0
def _add_account(context):
    context.account = add_account(context.db)
    add_account_preference(context.db, context.account.id)
    context.geography_id = add_account_geography(context.db, context.account)
Пример #4
0
def _add_account(context):
    """Add an account object to the context for use in step code."""
    context.account = add_account(context.db)
    add_account_preference(context.db, context.account.id)
    context.geography_id = add_account_geography(context.db, context.account)
Пример #5
0
def before_scenario(context, _):
    account = add_account(context.db)
    context.accounts = dict(foo=account)
    context.geography_id = add_account_geography(context.db, account)
    context.wake_word = add_wake_word(context.db)
    context.voice = add_text_to_speech(context.db)