class documentation

Undocumented

Static Method is_in_memory_db Undocumented
Method get_test_db_clone_settings Return a modified connection settings dict for the n-th clone of a DB.
Method setup_worker_connection Undocumented
Method test_db_signature Return a tuple that uniquely identifies a test database.
Method _clone_test_db Internal implementation - duplicate the test db tables.
Method _create_test_db Internal implementation - create the test db tables.
Method _destroy_test_db Internal implementation - remove the test db tables.
Method _get_test_db_name Internal implementation - return the name of the test DB that will be created. Only useful when called from create_test_db() and _create_test_db() and when no external munging is done with the 'NAME' settings.

Inherited from BaseDatabaseCreation:

Method __init__ Undocumented
Method clone_test_db Clone a test database.
Method create_test_db Create a test database, prompting the user for confirmation if the database already exists. Return the name of the test database created.
Method deserialize_db_from_string Reload the database with data from a string generated by the serialize_db_to_string() method.
Method destroy_test_db Destroy a test database, prompting the user for confirmation if the database already exists.
Method log Undocumented
Method mark_expected_failures_and_skips Mark tests in Django's test suite which are expected failures on this database and test which should be skipped on this database.
Method serialize_db_to_string Serialize all data in the database into a JSON string. Designed only for test runner usage; will not handle large amounts of data.
Method set_as_test_mirror Set this database up to be used in testing as a mirror of a primary database whose settings are given.
Method sql_table_creation_suffix SQL to append to the end of the test table creation statements.
Instance Variable connection Undocumented
Method _execute_create_test_db Undocumented
Method _get_database_display_str Return display string for a database for use in various actions.
Method _nodb_cursor Undocumented
@staticmethod
def is_in_memory_db(database_name): (source)

Undocumented

def get_test_db_clone_settings(self, suffix): (source)

Return a modified connection settings dict for the n-th clone of a DB.

def setup_worker_connection(self, _worker_id): (source)
def test_db_signature(self): (source)

Return a tuple that uniquely identifies a test database. This takes into account the special cases of ":memory:" and "" for SQLite since the databases will be distinct despite having the same TEST NAME. See https://www.sqlite.org/inmemorydb.html

def _clone_test_db(self, suffix, verbosity, keepdb=False): (source)

Internal implementation - duplicate the test db tables.

def _create_test_db(self, verbosity, autoclobber, keepdb=False): (source)

Internal implementation - create the test db tables.

def _destroy_test_db(self, test_database_name, verbosity): (source)

Internal implementation - remove the test db tables.

def _get_test_db_name(self): (source)

Internal implementation - return the name of the test DB that will be created. Only useful when called from create_test_db() and _create_test_db() and when no external munging is done with the 'NAME' settings.