summaryrefslogtreecommitdiff
path: root/tests/backends/models.py
AgeCommit message (Collapse)Author
2020-12-28Fixed #32158 -- Fixed loaddata crash on SQLite when table/column names are ↵Chinmoy Chakraborty
SQL keywords.
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-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-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.
2019-09-09Refs #29444 -- Allowed returning multiple fields from INSERT statements on ↵Johannes Hoppe
PostgreSQL. Thanks Florian Apolloner, Tim Graham, Simon Charette, Nick Pope, and Mariusz Felisiak for reviews.
2019-07-08Refs #29444 -- Added support for fetching a returned non-integer insert ↵Johannes Hoppe
values on Oracle. This is currently not actively used, since the ORM will ask the SQL compiler to only return auto fields.
2017-12-01Fixed #28849 -- Fixed referenced table and column rename on SQLite.Simon Charette
Thanks Ramiro for the input and Tim for the review.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2016-01-06Refs #8548 -- Removed a workaround for lengthy verbose name.Simon Charette
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-06-17Fixed #13711 -- Model check added to ensure that auto-generated column name ↵Anubhav Joshi
is within limits of the database. Thanks russellm for report and Tim Graham for review.
2014-06-05Avoided using BinaryField unecessarily in tests.Aymeric Augustin
Several database backends struggle with binary data. This change minimizes the risk of unrelated tests failures when binary fields trigger errors. Forward-port of 2e4bcb9b from stable/1.7.x.
2014-01-26Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette
It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.
2013-08-02Fixed #17519 -- Fixed missing SQL constraints to proxy models.Tim Graham
Thanks thibaultj for the report, jenh for the patch, and charettes for the tests.
2013-03-28Fixed #19954 -- Fixed MySQL _last_executed decodingClaude Paroz
Queries can contain binary data undecodable with utf-8. In this case, using the 'replace' errors mode when decoding seems like an acceptable representation of the query. Thanks Marcel Ryser for the report.
2013-03-07Added a ManyToManyField(db_constraint=False) option, this allows not ↵Alex Gaynor
creating constraints on the intermediary models.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner