def after_scenario(context, _): db = connect_to_db(context.client_config['DB_CONNECTION_CONFIG']) acct_repository = AccountRepository(db) acct_repository.remove(context.account) agreement_repository = AgreementRepository(db) agreement_repository.remove(context.agreement, testing=True)
def remove_account(db, account): account_repository = AccountRepository(db) account_repository.remove(account)