def after_scenario(context, _):
    """Cleanup data that could change during a scenario so next scenario starts fresh.

    The database is setup with cascading deletes that take care of cleaning up[
    referential integrity for us.  All we have to do here is delete the account
    and all rows on all tables related to that account will also be deleted.
    """
    _log.info("cleaning up after scenario...")
    remove_account(context.db, context.account)
    remove_account_activity(context.db)
    remove_text_to_speech(context.db, context.voice)
    for skill in context.skills.values():
        remove_skill(context.db, skill[0])
示例#2
0
def after_scenario(context, _):
    remove_account(context.db, context.account)
    remove_wake_word(context.db, context.wake_word)
    remove_text_to_speech(context.db, context.voice)
    for skill in context.skills.values():
        remove_skill(context.db, skill[0])
示例#3
0
def _delete_new_skill(context):
    remove_device_skill(context.db, context.new_manifest_skill)
    remove_skill(context.db, context.new_skill)
示例#4
0
def _delete_new_skill(context):
    """Delete a skill that was added during a test."""
    remove_device_skill(context.db, context.new_manifest_skill)
    remove_skill(context.db, context.new_skill)