summaryrefslogtreecommitdiff
path: root/tests/backends/base
AgeCommit message (Collapse)Author
2020-12-11Refs #32178 -- Fixed test_mark_expected_failures_and_skips_call teardown.Tim Graham
Test isolation failure observed on CockroachDB and PostgreSQL.
2020-12-10Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani
failures. Co-authored-by: Tim Graham <timograham@gmail.com>
2020-11-11Fixed #31762 -- Made reloading the database for tests use the base manager.Hasan Ramezani
Co-authored-by: Eugene Kulak <kulak.eugene@gmail.com>
2020-10-29Refs #32061 -- Unified DatabaseClient.runshell() in db backends.Simon Charette
2020-09-23Fixed #32012 -- Made test database creation sync apps models when migrations ↵Mariusz Felisiak
are disabled. Thanks Jaap Roes for the report.
2020-08-28Fixed #31956 -- Fixed crash of ordering by JSONField with a custom decoder ↵Mariusz Felisiak
on PostgreSQL. Thanks Marc Debureaux for the report. Thanks Simon Charette, Nick Pope, and Adam Johnson for reviews.
2020-06-30Fixed #28925 -- Fixed durations-only expressions crash on SQLite and MySQL.Sergey Fedoseev
This removes also unused DatabaseOperations.date_interval_sql().
2020-05-08Fixed #12990, Refs #27694 -- Added JSONField model field.sage
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael Michel for mentoring this Google Summer of Code 2019 project and everyone else who helped with the patch. Special thanks to Mads Jensen, Nick Pope, and Simon Charette for extensive reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-06Fixed a/an typos in "SQL" usage.Adam Johnson
2020-04-20Fixed #31477 -- Removed "using" argument from ↵Jon Dufresne
DatabaseOperations.execute_sql_flush().
2020-04-17Fixed #31473 -- Made sql_flush() use RESTART IDENTITY to reset sequences on ↵Jon Dufresne
PostgreSQL. The sql_flush() positional argument sequences is replaced by the boolean keyword-only argument reset_sequences. This ensures that the old function signature can't be used by mistake when upgrading Django. When the new argument is True, the sequences of the truncated tables will reset. Using a single boolean value, rather than a list, allows making a binary yes/no choice as to whether to reset all sequences rather than a working on a completely different set.
2020-04-17Added test coverage for DatabaseOperations.sql_flush().Jon Dufresne
2020-04-08Fixed typo in tests/backends/base/test_operations.py.Mariusz Felisiak
2020-04-02Refs #31051 -- Fixed reloading the database with circular related objects ↵Matthijs Kooijman
and natural keys for tests. Made deserialize_db_from_string() do not sort dependencies. deserialize_db_from_string() doesn't use natural keys, so there is no need to sort dependencies in serialize_db_to_string(). Moreover, sorting models cause issues for circular dependencies.
2020-04-02Refs #26552 -- Added test for reloading the database with self-referential ↵Matthijs Kooijman
objects.
2020-03-06Fixed #31345 -- Added BaseDatabaseIntrospection.get_relations().shankarj67
2020-03-04Fixed #31333 -- Added BaseDatabaseIntrospection.get_table_description().aryan
2020-03-04Added tests for BaseDatabaseIntrospection's stub methods.Mariusz Felisiak
2020-02-19Fixed tests when run in reverse.Mariusz Felisiak
Regression in 98f23a8af0be7e87535426c5c83058e2682bfdf8.
2020-02-14Fixed #26552 -- Deferred constraint checks when reloading the database with ↵Matthijs Kooijman
data for tests. deserialize_db_from_string() loads the full serialized database contents, which might contain forward references and cycles. That caused IntegrityError because constraints were checked immediately. Now, it loads data in a transaction with constraint checks deferred until the end of the transaction.
2020-01-20Fixed #31117 -- Isolated backends.base.test_creation.TestDbCreationTests.Matthijs Kooijman
Previously, this test could modify global state by changing connection.settings_dict. This dict is a reference to the same dict as django.db.connections.databases['default'], which is thus also changed. The cleanup of this test would replace connection.settings_dic` with a saved copy, which would leave the dict itself modified. Additionally, create_test_db() would also modify these same dicts, as well as settings.databases['default']['NAME'] by adding a "test_" prefix, which is what can cause problems later. This patch: - makes a complete copy of the connection and work on that, to improve isolation. - calls destroy_test_db() to let that code clean up anything done by create_test_db().
2020-01-20Refs #31117 -- Moved get_connection_copy() test hook to a module level.Mariusz Felisiak
2019-11-20Fixed #25388 -- Added an option to allow disabling of migrations during test ↵Jon Dufresne
database creation.
2019-04-18Fixed typos in docs, comments, and exception messages.Ville Skyttä
2019-01-14Refs #28478 -- Prevented database feature based skipping on tests ↵Simon Charette
disallowing queries. Database features may require a connection to be established to determine whether or not they are enabled.
2018-11-27Switched TestCase to SimpleTestCase where possible in Django's tests.Tim Graham
2018-11-17Added BaseDatabaseSchemaEditor._effective_default() to allow testing without ↵Tim Graham
a connection.
2018-11-17Fixed #29505 -- Removed SchemaEditor's calling of callable defaults.Tim Graham
Thanks Eugene Pakhomov for the suggested fix.
2018-10-02Fixed #29813 -- Fixed DatabaseOperation test when run in isolation on MySQL.Jon Dufresne
2018-02-10Fixed #24747 -- Allowed transforms in QuerySet.order_by() and distinct(*fields).Matthew Wilkes
2017-09-30Increased test coverage for db/backends/base/operations.py.Mads Jensen
2017-09-21Refs #28595 -- Added a hook to add execute wrappers for database queries.Shai Berger
Thanks Adam Johnson, Carl Meyer, Anssi Kääriäinen, Mariusz Felisiak, Michael Manfre, and Tim Graham for discussion and review.
2017-09-18Fixed #26608 -- Added support for window expressions (OVER clause).Mads Jensen
Thanks Josh Smeaton, Mariusz Felisiak, Sergey Fedoseev, Simon Charettes, Adam Chainz/Johnson and Tim Graham for comments and reviews and Jamie Cockburn for initial patch.
2017-06-21Reorganized backends tests.Mariusz Felisiak