'Setup databases and then flush to remove data added by migrations.'

def setup_databases(self):

    return_value = super(NoseTestSuiteRunner, self).setup_databases()
    call_command('flush', verbosity=0, interactive=False, load_initial_data=False)
    connection = connections[DEFAULT_DB_ALIAS]
    if ((connection.vendor == 'sqlite') and (not connection.features.supports_sequence_reset)):
        with transaction.atomic(using=DEFAULT_DB_ALIAS):
            cursor = connection.cursor()
            cursor.execute('delete    from    sqlite_sequence;')
    return return_value
