Commit Graph

20 Commits

Author SHA1 Message Date
Adam Johnson a8b2db1cae Optimized Model and QuerySet pickling version comparison. 2020-05-11 09:50:11 +02:00
Tim Graham 193c109327 Switched TestCase to SimpleTestCase where possible in Django's tests. 2018-11-27 08:58:44 -05:00
Nerl~ 97cb3bd16d Fixed #28456 -- Allowed customizing Model pickling by overriding __getstate__(). 2017-08-11 15:27:25 -04:00
chillaranand d6eaf7c018 Refs #23919 -- Replaced super(ClassName, self) with super(). 2017-01-25 12:23:46 -05:00
Tim Graham 10a162809f Refs #24007 -- Removed an apps.populate() call in model unpickling that can cause deadlocks. 2016-02-08 08:28:48 -05:00
Simon Charette 1c5f4e86bc Fixed #25745 -- Promoted RuntimeWarnings to errors in the test suite. 2015-11-14 11:33:28 -05:00
Tim Graham 29e90f3ae0 Fixed model_regress test failure on non-ASCII path; refs #24717. 2015-04-30 07:48:21 -04:00
David D. Riddle 31e6c9c8e3 Fixed #24717 -- Fixed model_regress test failure on RHEL6 SCL
The test failed on RHEL6 systems running python 2.7 from a RedHat
Software Collection (SCL) because this test runs an external python
script with a stripped system environment. RedHat SCLs work by setting
a number of system environment variables when these are stripped out by
this test the python 2.7 interpreter is no longer able to function
properly because it can not find the system libraries needed.

Now we use use mock to modify the system environment directly.
2015-04-29 12:28:24 -04:00
Tim Graham 0f941f57ba Fixed mistakes in tests unveiled by version bump to 1.8.1.
Forwardport of e7366ab1f9 from stable/1.8.x
2015-04-02 08:14:08 -04:00
Aymeric Augustin a8fe12417f Normalized usage of the tempfile module.
Specifically stopped using the dir argument.
2015-02-23 16:55:27 +01:00
Tim Graham ad50b6c853 Fixed "environment can only contain strings" in model_regress test on Windows. 2015-02-17 13:54:18 -05:00
Tim Graham d316b43d0a Refs #24324 -- Fixed UnicodeDecodeError in model_regress test on non-ASCII path. 2015-02-17 07:32:48 -05:00
Tim Graham 0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
darkryder 9ec8aa5e5d Fixed #24149 -- Normalized tuple settings to lists. 2015-02-03 14:59:45 -05:00
Collin Anderson 5338ff4808 Fixed #24160 -- Fixed model_regress test on Windows; refs #24007. 2015-01-16 11:59:08 -05:00
Tim Graham 995be4a137 Fixed refs #24007 test on Windows. 2014-12-19 14:11:17 -05:00
Claude Paroz 1d9fc5caa9 Made model_regress unpickling test CWD-independent
Refs #24007. Thanks Tim Graham for his help with the patch.
2014-12-19 18:37:32 +01:00
Collin Anderson 4fb38b7307 Allowed Python executable names other than python in test from refs #24007. 2014-12-17 20:09:24 -05:00
Claude Paroz 108b8bf852 Fixed #24007 -- Ensure apps registry's ready before unpickling models
This prevents AppRegistryNotReady errors when unpickling Django
models from an external script.
2014-12-17 18:33:32 +01:00
Anubhav Joshi 42736ac8e8 Fixed #21430 -- Added a RuntimeWarning when unpickling Models and QuerySets from a different Django version.
Thanks FunkyBob for the suggestion, prasoon2211 for the initial patch,
and akaariai, loic, and charettes for helping in shaping the patch.
2014-06-11 10:03:34 -04:00