summaryrefslogtreecommitdiff
path: root/tests/modeltests/get_or_create/tests.py
AgeCommit message (Collapse)Author
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner
2012-09-19Revert "Fixed #16865 -- Made get_or_create use read database for initial get ↵Carl Meyer
query." Thanks to Jeremy Dunck for pointing out the problem with this change. If in a single transaction, the master deletes a record and then get_or_creates a similar record, under the new behavior the get_or_create would find the record in the slave db and fail to re-create it, leaving the record nonexistent, which violates the contract of get_or_create that the record should always exist afterwards. We need to do everything against the master here in order to ensure correctness. This reverts commit 901af865505310a70dd02ea5b3becbf45819b652.
2012-09-19Fixed #16865 -- Made get_or_create use read database for initial get query.Carl Meyer
Thanks Rick van Hattem for the report and trbs for the patch.
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-01-02Fixed #16340 -- Made `get_or_create()` re-raise any `IntegrityError` with ↵Julien Phalip
its original traceback. Thanks to d0ugal and Jonas Obrist. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13Convert all modeltests to use absolute imports, rather than relative ones.Alex Gaynor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09Fixed #12979 -- allowed using savepoints in TestCase (i.e. tests with ↵Alex Gaynor
transactions disabled), convert the GetOrCreate tests to use this. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12Fixed the get_or_create tests for postgreSQL, by usingMalcolm Tredinnick
TransactionTestCase. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12Migrate get_or_create doctests. Thanks to Alex Gaynor.Russell Keith-Magee
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13785 bcc190cf-cafb-0310-a4f2-bffc1f526a37