summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-01-21Fixed #30274 -- Prevented segmentation fault on LineString iteration.Sergey Fedoseev
This reverts commit 138a78ec8cab5e1df0c8ba2a3ee895cb756ff1ae and adds a test for the regression.
2020-01-21Refs #29095 -- Added test for using QuerySet.count() with window expressions ↵Christopher G Johnson
ordered by related fields. Fixed in 3f32154f40a855afa063095e3d091ce6be21f2c5.
2020-01-20Fixed #31183 -- Added a feature flag for "<db> only supports UNBOUNDED ↵Tim Graham
together with PRECEDING and FOLLOWING".
2020-01-20Refs #31117 -- Made various tests properly handle unexpected databases aliases.Matthijs Kooijman
- Used selected "databases" instead of django.db.connections. - Made routers in tests.migrations skip migrations on unexpected databases. - Added DiscoverRunnerGetDatabasesTests.assertSkippedDatabases() hook which properly asserts messages about skipped databases.
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
2020-01-20Fixed #31142 -- Fixed MakeValid.output_field when geometry type is changed.Sergey Fedoseev
Regression in 2ef4b4795e29be8c33a6de9cc0c05b59025d13a5.
2020-01-18Fixed field default in dates tests.Mariusz Felisiak
2020-01-16Fixed #30752 -- Allowed using ExceptionReporter subclasses in error reports.Pavel Lysak
2020-01-16Fixed #31162 -- Prevented error logs when using WKT strings in lookups.Mariusz Felisiak
Thanks dbxnr for the initial patch. Regression in 6f44f714c92d2966dca390ebd3054e5fb0bb0c80.
2020-01-16Fixed #30765 -- Made cache_page decorator take precedence over max-age ↵Flavio Curella
Cache-Control directive.
2020-01-16Fixed #29998 -- Allowed multiple OneToOneFields to the parent model.Mariusz Felisiak
We assumed that any OneToOneField's in a child model must be the parent link and raised an error when parent_link=True was not specified. This patch allows to specify multiple OneToOneField's to the parent model. OneToOneField's without a custom related_name will raise fields.E304 and fields.E305 so this should warn users when they try to override the auto-created OneToOneField.
2020-01-15Fixed #31124 -- Fixed setting of get_FOO_display() when overriding inherited ↵Carlton Gibson
choices. Regression in 2d38eb0ab9f78d68c083a5b78b1eca39027b279a
2020-01-15Refs #27468 -- Added explicit tests for django.utils.crypto.salted_hmac()Claude Paroz
2020-01-15Refs #31136 -- Made QuerySet.values()/values_list() group only by selected ↵Mariusz Felisiak
annotation. Regression in 0f843fdd5b9b2f2307148465cd60f4e1b2befbb4.
2020-01-15Fixed #29871 -- Allowed setting pk=None on a child model to create a copy.chetan22
Thanks Simon Charette and Tim Graham for the initial patch.
2020-01-11Fixed #31155 -- Fixed a system check for the longest choice when a named ↵Mariusz Felisiak
group contains only non-string values. Regression in b6251956b69512bf230322bd7a49b629ca8455c6. Thanks Murat Guchetl for the report.
2020-01-10Fixed #30980 -- Improved error message when checking uniqueness of admin ↵Adam Donaghy
actions' __name__. Thanks Keshav Kumar for the initial patch.
2020-01-10Fixed #23004 -- Added request.META filtering to SafeExceptionReporterFilter.Carlton Gibson
Co-authored-by: Ryan Castner <castner.rr@gmail.com>
2020-01-10Refs #23004 -- Allowed exception reporter filters to customize settings ↵Carlton Gibson
filtering. Thanks to Tim Graham for the original implementation idea. Co-authored-by: Daniel Maxson <dmaxson@ccpgames.com>
2020-01-10Fixed #31154 -- Added support for using enumeration types in templates.Adam Johnson
Enumeration helpers are callables, so the template system tried to call them with no arguments. Thanks Rupert Baker for helping discover this.
2020-01-09Added file cleanup in FileFieldTests.test_pickle().Carlton Gibson
2020-01-09Fixed #30995 -- Allowed converter.to_url() to raise ValueError to indicate ↵Jack Cushman
no match.
2020-01-09Fixed #31148 -- Added error messages on update()/delete() operations ↵Hasan Ramezani
following union(), intersection(), and difference().
2020-01-09Fixed #21238 -- Fixed restoring attributes when pickling FileField and ↵Hasan Ramezani
ImageField.
2020-01-09Refs #21238 -- Added more tests for pickling FileField and ImageField.Hasan Ramezani
2020-01-09Removed unused lines in ImageFieldTests.test_pickle().Hasan Ramezani
2020-01-08Added tests for using the same name for multiple URL patterns.Jack Cushman
2020-01-08Fixed #31118 -- Made FileInput to avoid the required attribute when initial ↵Shubham singh
data exists.
2020-01-08Fixed #31141 -- Relaxed system check of translation settings for sublanguages.Mariusz Felisiak
Regression in 4400d8296d268f5a8523cd02ddc33b12219b2535. Thanks Enrique Matías Sánchez for the report.
2020-01-07Fixed timezones tests for PyYAML 5.3+.Mariusz Felisiak
2020-01-06Removed "Don't do that" from docs and error messages.Adam Johnson
It's slightly aggressive and doesn't explain itself.
2020-01-06Fixed #11385 -- Made forms.DateTimeField accept ISO 8601 date inputs.Claude Paroz
Thanks José Padilla for the initial patch, and Carlton Gibson for the review.
2020-01-04Fixed #31136 -- Disabled grouping by aliases on QuerySet.values()/values_list().Mariusz Felisiak
Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Thanks Sigurd Ljødal for the report.
2020-01-03Reorganized forms.DateTimeField tests.Claude Paroz
2020-01-03Fixed #31133 -- Fixed crash when subtracting against a subquery annotation.Simon Charette
The subtract_temporals() database operation was not handling expressions returning SQL params in mixed database types. Regression in 35431298226165986ad07e91f9d3aca721ff38ec. Thanks Reupen Shah for the report.
2020-01-03Fixed #28991 -- Added EmptyFieldListFilter class in admin.filters.Federico Jaramillo Martínez
Thanks Simon Charette and Carlton Gibson for reviews. Co-Authored-By: Jonas Haag <jonas@lophus.org> Co-Authored-By: Christophe Baldy <christophe.baldy@polyconseil.fr>
2020-01-03Refs #31040 -- Fixed crypt.crypt() call in test_hashers.py.Mariusz Felisiak
An empty string is invalid salt in Python 3 and raises exception since Python 3.9, see https://bugs.python.org/issue38402.
2020-01-02Fixed #31128 -- Fixed TemplateSyntaxError in simple_tag() and ↵Patrick Seebauer
inclusion_tag() for kwargs.
2019-12-31Improved tests assertions in cache tests.Jon Dufresne
Added assertions to compare results of .add(), .delete(), .touch(), .incr(), .decr(), and .get_or_set() methods. Made tests use assertIs() rather than assertTrue/False().
2019-12-31Refs #31117 -- Isolated backends.sqlite.test_creation.TestDbSignatureTests.Mariusz Felisiak
2019-12-31Fixed #31097 -- Fixed crash of ArrayAgg and StringAgg with filter when used ↵David Wobrock
in Subquery.
2019-12-31Refs #31097 -- Added tests for filter in ArrayAgg and StringAgg.David Wobrock
2019-12-30Fixed #30892 -- Fixed slugify() and admin's URLify.js for "İ".Sjbrgsn
Thanks Luis Nell for the implementation idea and very detailed report. Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2019-12-30Fixed #31071 -- Disabled insert optimization for primary keys with defaults ↵Simon Charette
when loading fixtures. Model.save_base() is called directly when loading fixtures and assumes existing rows will be updated. Branching of "raw" allows to maintain the optimization introduced in #29260 while supporting this edge case. Regression in 85458e94e38c20e57939947ee515a1a53689659f. Thanks Reupen Shah for the report.
2019-12-27Fixed random models_fields.test_uuid.TestQuerying failures.Mariusz Felisiak
Random failures depended on a generated UUID.
2019-12-27Increased test coverage of django.utils.inspect.Mads Jensen
2019-12-27Fixed #31114 -- Fixed HttpRequest.build_absolute_uri() crash with ↵Jon Dufresne
reverse_lazy() locations.
2019-12-27Fixed #31121 -- Cleared Site cache in SitesFrameworkTests.Claude Paroz
Thanks Matthijs Kooijman for the report and analysis.
2019-12-23Fixed #31106 -- Fixed migrations crash on PostgreSQL 10+ when adding FK ↵Mariusz Felisiak
constraints inline and changing data. This allows adding foreign key constraints inline and changing data in the same migration on PostgreSQL 10+. Regression in 738faf9da2a5cd03148a36375db80746c99c9623. Thanks Janne Rönkkö for the report and Simon Charette for the implementation idea and review.