class DatabaseCreation(BaseDatabaseCreation): (source)
Undocumented
Method | set |
Set this database up to be used in testing as a mirror of a primary database whose settings are given. |
Method | test |
Return a tuple with elements of self.connection.settings_dict (a DATABASES setting value) that uniquely identify a database accordingly to the RDBMS particularities. |
Method | _create |
Internal implementation - create the test db tables. |
Method | _create |
Undocumented |
Method | _destroy |
Destroy a test database, prompting the user for confirmation if the database already exists. Return the name of the test database created. |
Method | _destroy |
Undocumented |
Method | _execute |
Execute statements which are allowed to fail silently if the Oracle error code given by `acceptable_ora_err` is raised. Return True if the statements execute without an exception, or False otherwise. |
Method | _execute |
Undocumented |
Method | _execute |
Undocumented |
Method | _execute |
Undocumented |
Method | _get |
Return the 'production' DB name to get the test DB creation machinery to work. This isn't a great deal in this case because DB names as handled by Django don't have real counterparts in Oracle. |
Method | _get |
Undocumented |
Method | _handle |
Undocumented |
Method | _switch |
Switch to the user that's used for creating the test database. |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Undocumented |
Method | _test |
Return a value from the test settings dict, or a given default, or a prefixed entry from the main settings dict. |
Method | _test |
Undocumented |
Property | _maindb |
This is analogous to other backends' `_nodb_connection` property, which allows access to an "administrative" connection which can be used to manage the test databases. For Oracle, the only connection that can be used for that purpose is the main (non-test) connection. |
Inherited from BaseDatabaseCreation
:
Method | __init__ |
Undocumented |
Method | clone |
Clone a test database. |
Method | create |
Create a test database, prompting the user for confirmation if the database already exists. Return the name of the test database created. |
Method | deserialize |
Reload the database with data from a string generated by the serialize_db_to_string() method. |
Method | destroy |
Destroy a test database, prompting the user for confirmation if the database already exists. |
Method | get |
Return a modified connection settings dict for the n-th clone of a DB. |
Method | log |
Undocumented |
Method | mark |
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 |
Serialize all data in the database into a JSON string. Designed only for test runner usage; will not handle large amounts of data. |
Method | setup |
Undocumented |
Method | sql |
SQL to append to the end of the test table creation statements. |
Instance Variable | connection |
Undocumented |
Method | _clone |
Internal implementation - duplicate the test db tables. |
Method | _execute |
Undocumented |
Method | _get |
Return display string for a database for use in various actions. |
Method | _nodb |
Undocumented |
Set this database up to be used in testing as a mirror of a primary database whose settings are given.
Return a tuple with elements of self.connection.settings_dict (a DATABASES setting value) that uniquely identify a database accordingly to the RDBMS particularities.
Destroy a test database, prompting the user for confirmation if the database already exists. Return the name of the test database created.
Execute statements which are allowed to fail silently if the Oracle error code given by `acceptable_ora_err` is raised. Return True if the statements execute without an exception, or False otherwise.
Undocumented
Return the 'production' DB name to get the test DB creation machinery to work. This isn't a great deal in this case because DB names as handled by Django don't have real counterparts in Oracle.
Undocumented
Switch to the user that's used for creating the test database. Oracle doesn't have the concept of separate databases under the same user, so a separate user is used; see _create_test_db(). The main user is also needed for cleanup when testing is completed, so save its credentials in the SAVED_USER/SAVED_PASSWORD key in the settings dict.
Return a value from the test settings dict, or a given default, or a prefixed entry from the main settings dict.