0
0
mirror of https://github.com/django/django.git synced 2024-11-29 14:46:18 +01:00
Commit Graph

70 Commits

Author SHA1 Message Date
Hasan Ramezani
3f7b327562 Fixed #31235 -- Made assertQuerysetEqual() compare querysets directly.
This also replaces assertQuerysetEqual() to
assertSequenceEqual()/assertCountEqual() where appropriate.

Co-authored-by: Peter Inglesby <peter.inglesby@gmail.com>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-11-06 09:24:50 +01:00
Mariusz Felisiak
cf21fc9bf0
Enforced uniqueness of natural keys used in tests. 2020-04-07 10:54:19 +02:00
Jon Dufresne
92e5abd7a3 Refs #29983 -- Added test for FIXTURES_DIRS pathlib support. 2019-11-06 08:06:55 +01:00
Matt Wiens
e817ae74da Followed style guide for model attribute ordering. 2018-12-27 19:34:14 -05:00
Sergey Fedoseev
91841c77cd Fixed loaddata error message when uncompressed fixture has a dot in its name. 2018-09-26 15:30:15 -04:00
Morgan Aubert
704443acac Fixed #29363 -- Added SimpleTestCase.assertWarnsMessage(). 2018-05-09 11:40:28 -04:00
Tim Graham
29f607927f Fixed spelling of "nonexistent". 2017-02-03 08:01:45 -05:00
Tim Graham
4e729feaa6 Refs #23919 -- Removed django.utils._os.upath()/npath()/abspathu() usage.
These functions do nothing on Python 3.
2017-01-20 08:01:02 -05:00
Tim Graham
109b33f64c Refs #23919 -- Simplified assertRaisesRegex()'s that accounted for Python 2. 2017-01-20 08:49:47 +01:00
Claude Paroz
2b281cc35e Refs #23919 -- Removed most of remaining six usage
Thanks Tim Graham for the review.
2017-01-18 21:33:28 +01:00
Claude Paroz
7b2f2e74ad Refs #23919 -- Removed six.<various>_types usage
Thanks Tim Graham and Simon Charette for the reviews.
2017-01-18 20:18:46 +01:00
Claude Paroz
c716fe8782 Refs #23919 -- Removed six.PY2/PY3 usage
Thanks Tim Graham for the review.
2017-01-18 16:21:28 +01:00
Claude Paroz
f3c43ad1fd Refs #23919 -- Removed python_2_unicode_compatible decorator usage 2017-01-18 13:44:34 +01:00
Claude Paroz
d7b9aaa366 Refs #23919 -- Removed encoding preambles and future imports 2017-01-18 09:55:19 +01:00
Simon Charette
dc1193085d Made contenttypes and auth apps unavailable when not necessary in tests. 2017-01-13 08:50:03 -05:00
Tim Graham
b5f0b3478d Fixed #27579 -- Added aliases for Python 3's assertion names in SimpleTestCase. 2016-12-07 17:42:31 -05:00
za
321e94fa41 Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings. 2016-11-10 21:30:21 -05:00
Tim Graham
c9ae09addf Replaced use of TestCase.fail() with assertRaises().
Also removed try/except/fail antipattern that hides exceptions.
2016-06-28 11:21:26 -04:00
Jon Dufresne
4f336f6652 Fixed #26747 -- Used more specific assertions in the Django test suite. 2016-06-16 14:19:18 -04:00
Tim Graham
92053acbb9 Fixed E128 flake8 warnings in tests/. 2016-04-08 10:12:33 -04:00
Hasan
26ad01719d Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate. 2016-01-29 13:37:33 -05:00
Hasan
253adc2b8a Refs #26022 -- Used context manager version of assertRaisesMessage in tests. 2016-01-29 13:03:39 -05:00
Tim Graham
e0837f2cb1 Fixed #25508 -- Modified QuerySet.__repr__() to disambiguate it from a list. 2015-10-06 12:38:34 -04:00
Dražen Odobašić
b1e33ceced Fixed #23395 -- Limited line lengths to 119 characters. 2015-09-12 11:40:50 -04:00
Flavio Curella
c2e70f0265 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 2015-07-27 18:28:13 -04:00
Tim Graham
b8d6cdbcc9 Refs #24324 -- Skipped fixtures_regress tests that fail on Python 2 on a non-ASCII path. 2015-02-18 07:25:36 -05:00
Tim Graham
0ed7d15563 Sorted imports with isort; refs #23860. 2015-02-06 08:16:28 -05:00
Claude Paroz
750dbb1133 Removed unneeded null param to ManyToManyField 2014-12-23 19:01:03 +01:00
Claude Paroz
9fecb86a52 Fixed #17946 -- Fixed deserialization of self-referencing M2M fields
Thanks Philip Mountifield for the report and excellent analysis, and
Simon Charette for the review.
2014-12-23 16:01:39 +01:00
Julien Phalip
580e9d0045 Fixed a test to correctly calculate a fixture's relative path. 2014-11-17 02:32:04 +01:00
Konrad Świat
934a16dc93 Fixed #23468 -- Added checks for duplicate fixtures directories in loaddata.
If settings.FIXTURE_DIRS contains duplicates or a default fixture
directory (app_name/fixtures), ImproperlyConfigured is raised.

Thanks to Berker Peksag and Tim Graham for review.
2014-10-31 18:21:54 -04:00
Tim Graham
28da093ae2 Allowed test from refs #23612 to be run from a directory other than tests. 2014-10-22 15:24:33 -04:00
Loic Bistuer
494ba051bb Made testing of stdout and stderr more consistent.
Refs #23663.
2014-10-22 09:25:50 +07:00
Collin Anderson
a6a8268d19 Fixed #23660 -- Moved sort_dependencies to core. 2014-10-16 03:04:13 +07:00
Claude Paroz
7a893ee771 Fixed #23651 -- Isolated non-existent fixture tests
Previous versions of the tests were buggy, as initial_data.json
did exist and the test wasn't failing. It was finally failing on
Python 3.4.2.
Thanks Raphaël Hertzog for the report (and Debian bug #765117
contributors).
2014-10-15 09:17:44 +02:00
Brandon Taylor
16ed35fafc Fixed #23612 -- Normalized fixuture paths to allow referencing relative paths on Windows. 2014-10-09 14:58:20 -04:00
Tim Graham
99f5ea9cc8 Fixed #22653 -- Added some database feature flags to tests.
Thanks Rahul Priyadarshi.
2014-06-11 11:45:18 -04:00
Ramiro Morales
d731f48ece Merge pull request #2679 from ramiro/t22421
Fixed #22421 -- Regression in fixtures loading.
2014-05-21 18:57:46 -03:00
Esau Rodriguez
ec9043ab2f Fixed #21799 - Modified loaddata --ignorenonexistent to ignore models. 2014-05-18 15:52:07 -04:00
Ramiro Morales
862e1ff234 Fixed #22421 -- Regression in fixtures loading.
Loading fixtures were failing since the refactoring in 244e2b71f5 for
inheritance setups where the chain contains abstract models and the
root ancestor contains a M2M relation.

Thanks Stanislas Guerra for the report.

Refs #20946.
2014-05-17 17:36:45 -03:00
Tim Graham
5971630de9 Fixed flake8 error. 2014-05-12 07:09:53 -04:00
Ramiro Morales
c1b412ebd6 Fixed some test models' natural_key() methods. 2014-05-11 23:09:12 -03:00
Ramiro Morales
9762ba2630 Unneeded, Python 3 incompatible code in a75324c6 tests. 2014-05-11 20:39:00 -03:00
Rainer Koirikivi
a75324c654 Fixed #14226 -- Dependency calculation for complex M2M relations.
`sort_dependencies` incorrectly interpreted 'complex' M2M relations
(with explicit through models) as dependencies for a model. This caused
circular complex M2M relations to be unserializable by dumpdata.

Thanks to aneil for the report and outofculture for initial tests.
2014-05-11 19:50:01 -03:00
chriscauley
66ec9ee441 Fixed #22378 -- Updated \d to [0-9]+ in urlpatterns of docs and tests.
Thanks tomwys for the suggestion.
2014-04-16 20:36:29 -04:00
Rodolfo Carvalho
0d91225892 Fixed many typos in comments and docstrings.
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Aymeric Augustin
e32095616c Imported override_settings from its new location. 2013-12-23 21:37:56 +01:00
Claude Paroz
41ebc4838d Fixed #21551 -- Reenabled loading fixtures from subdirectory
This was a regression in Django 1.6 that was only partially
restored in 839940f27f.
Thanks Jonas Haag for the report.
2013-12-07 10:47:34 +01:00
Claude Paroz
97ac22ebfc Fixed #21457 -- Allowed fixture file name to contain dots
Thanks Keryn Knight for the report.
2013-11-18 20:32:13 +01:00
Jason Myers
7a61c68c50 PEP8 cleanup
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-11-02 23:50:49 -05:00