def test_client(): app = buildTestApp() # Establish an application context before running the tests. ctx = app.app_context() ctx.push() tableName = current_app.config['TABLE_NAMES']['USER_AUTH_TABLE'] yield app.test_client() # this is where the testing happens! # After exceptionsToRaise = [] for user in userAuthsForDbToDelete: try: dynamo.get_table(tableName).delete_item(Key={'id': user.id}) except ClientError as e: exceptionsToRaise.append(e) for e in exceptionsToRaise: print(e.response['Error']['Message']) if not exceptionsToRaise == []: raise Exception("Error while trying to delete items from db") ctx.pop()
def test_client(): app = buildTestApp() # Establish an application context before running the tests. ctx = app.app_context() ctx.push() yield app.test_client() # this is where the testing happens! # After ctx.pop()
def test_client(): app = buildTestApp() # Establish an application context before running the tests. ctx = app.app_context() ctx.push() yield app.test_client() # this is where the testing happens! # After exceptionsToRaise = [] cleanupRunMaps(exceptionsToRaise) for e in exceptionsToRaise: print(e.response['Error']['Message']) if not exceptionsToRaise == []: raise Exception("Error while trying to delete items from db") ctx.pop()