def database_teardown(context):
 for alias in connections:
  try:
   call_command('flush', database=alias, interactive=False)
  except TransactionManagementError as e:
   print ("Couldn't flush the database, got a TransactionManagementError: " + e.message)

def database_teardown ( context ) : for alias in connections : try : call_command ( 'flush' , database = alias , interactive = False ) except TransactionManagementError as e : print ( "Couldn't flush the database, got a TransactionManagementError: " + e . message )
behave features are analogous to test suites .