summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2020-11-03Removed serial pk assumption in ordering tests.Tim Graham
Fixed OrderingTests.test_order_by_fk_attname and test_order_by_pk on CockroachDB.
2020-11-03Refs #32061 -- Fixed test_crash_password_does_not_leak() crash on Windows.Mariusz Felisiak
When env is passed to subprocess.run() we should pass all existing environment variables. This fixes crash on Windows: Fatal Python error: failed to get random numbers to initialize Python Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python Python runtime state: preinitialized
2020-11-03Fixed #32162 -- Fixed setting Content-Length header in AsyncRequestFactory.Patrick Arminio
2020-11-03Fixed DistinctOnTests.test_basic_distinct_on on CockroachDB.Tim Graham
2020-11-03Removed serial pk assumption from ↵Tim Graham
FormfieldShouldDeleteFormTests.test_custom_delete.
2020-11-03Fixed #32166 -- Removed redundant definition of Greatest in ↵Sicong
test_expression_on_aggregation.
2020-11-02Fixed #32132 -- Fixed column types in m2m intermediary tables for ↵David-Wobrock
Positive(Big/Small)IntegerFields.
2020-11-02Refs #32132 -- Added rel_db_type() tests for auto and integer fields.David-Wobrock
2020-10-30Fixed #32153 -- Fixed management commands when using required list options.Hasan Ramezani
Thanks Mark Gajdosik for the report and initial patch.
2020-10-30Updated MultiValueDict.update() to mirror dict.update() behavior.Nick Pope
Changes in behavior include: - Accepting iteration over empty sequences, updating nothing. - Accepting iterable of 2-tuples providing key-value pairs. - Failing with the same or comparable exceptions for invalid input. Notably this replaces the previous attempt to catch TypeError which was unreachable as the call to .items() resulted in AttributeError on non-dict objects.
2020-10-30Increased test coverage for django.utils.datastructures.MultiValueDict.Nick Pope
Co-authored-by: Mads Jensen <mje@inducks.org>
2020-10-30Increased test coverage for django.utils.datastructures.OrderedSet.Mads Jensen
Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
2020-10-30Refs #32061 -- Prevented password leak on MySQL dbshell crash.Simon Charette
The usage of the --password flag when invoking the mysql CLI has the potential of exposing the password in plain text if the command happens to crash due to the inclusion of args provided to subprocess.run(check=True) in the string representation of the subprocess.CalledProcessError exception raised on non-zero return code. Since this has the potential of leaking the password to logging facilities configured to capture crashes (e.g. sys.excepthook, Sentry) it's safer to rely on the MYSQL_PWD environment variable instead even if its usage is discouraged due to potential leak through the ps command on old flavors of Unix. Thanks Charlie Denton for reporting the issue to the security team. Refs #24999.
2020-10-30Refs #32061 -- Added test for dbshell password leak on PostgreSQL.Simon Charette
2020-10-29Refs #32061 -- Unified DatabaseClient.runshell() in db backends.Simon Charette
2020-10-29Fixed #32152 -- Fixed grouping by subquery aliases.Christian Klus
Regression in 42c08ee46539ef44f8658ebb1cbefb408e0d03fe. Thanks Simon Charette for the review.
2020-10-28Made small readability improvements.Martin Thoma
2020-10-28Refs #28215 -- Marked auth credentials as sensitive variables.Hasan Ramezani
Co-authored-by: Collin Anderson <collin@onetencommunications.com>
2020-10-28Refs #25780 -- Removed redundant status code assertions from tests.Jon Dufresne
2020-10-28Fixed #32143 -- Used EXISTS to exclude multi-valued relationships.Simon Charette
As mentioned in the pre-existing split_exclude() docstring EXISTS is easier to optimize for query planers and circumvents the IN (NULL) handling issue.
2020-10-28Refs #27149 -- Fixed sql.Query identity.Simon Charette
By making Query subclass BaseExpression in 35431298226165986ad07e91f9d3aca721ff38ec the former defined it's identity based off _construct_args which is not appropriate.
2020-10-27Fixed #1891, Fixed #11707 -- Prevented duplicates with limit_choices_to on ↵alvinshaita
multi-value relations.
2020-10-27Removed unneeded @no_oracle skips.Tim Graham
2020-10-27Made OracleSpatialAdapter clone geometries rather than mutate them.Tim Graham
2020-10-27Fixed some queries tests when primary key values are large.Tim Graham
On CockroachDB, primary key values stored in these fields are larger than they accept. Fixes: queries.test_bulk_update.BulkUpdateNoteTests.test_multiple_fields, queries.test_bulk_update.BulkUpdateNoteTests.test_inherited_fields, and queries.tests.RelatedLookupTypeTests.test_values_queryset_lookup.
2020-10-27Removed an obsolete query test that assumes serial pks.Tim Graham
The code from the original fix (922aba3def68e57c405a0e50d353a790af85b00a) was removed in 419de7b00daabf5e9be064198d370cdbf19b5f2d.
2020-10-26Fixed #29497 -- Fixed loss of assigned parent when saving child with ↵Hannes Ljungberg
bulk_create() after parent.
2020-10-26Fixed admin_views's test_history_view on databases that don't use serial pks.Tim Graham
2020-10-26Simplifed formset iteration using enumerate().Jon Dufresne
2020-10-23Fixed #32134 -- Fixed crash of __range lookup with namedtuple.Adam Johnson
Regression in 8be79984dce7d819879a6e594ca69c5f95a08378. Thanks Gordon Wrigley for the report.
2020-10-22Replaced @no_oracle skips with DatabaseFeatures.allows_group_by_lob.Tim Graham
2020-10-22Fixed #32124 -- Added per-view opt-out for APPEND_SLASH behavior.Carlton Gibson
2020-10-22Fixed #32130 -- Fixed pre-Django 3.1 password reset tokens validation.Mariusz Felisiak
Thanks Gordon Wrigley for the report and implementation idea. Regression in 226ebb17290b604ef29e82fb5c1fbac3594ac163.
2020-10-21Fixed #26390 -- Disabled grouping by Random().Étienne Beaulé
Thanks to Tzu-ping Chung for the tests.
2020-10-21Fixed #13060 -- Improved error message when ManagementForm data is missing.manav014
2020-10-21Fixed #32046 -- Added CreateCollation/RemoveCollation operations for PostgreSQL.Tom Carrick
2020-10-21Fixed #26615 -- Made password reset token invalidate when changing email.Jacob Walls
Co-Authored-By: Silas Barta <sbarta@gmail.com>
2020-10-21Fixed #32126 -- Fixed grouping by Case() annotation without cases.Hannes Ljungberg
Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2020-10-21Removed hardcoded pks in syndication tests.Octavio
2020-10-20Fixed #32121 -- Fixed detecting uniqueness of USERNAME_FIELD when using ↵Hannes Ljungberg
Meta.constraints. Co-authored-by: Simon Charette <charettes@users.noreply.github.com>
2020-10-20Fixed #32120 -- Added DatabaseFeatures.indexes_foreign_keys.Tim Graham
2020-10-19Fixed #32108 -- Made transaction.on_commit() raise TypeError when callback ↵Herbert Poul
is not a callable.
2020-10-19Reverted "Reduced time.sleep() in cache touch() tests."Mariusz Felisiak
This reverts commit 177a49e79c882603da64d45995f5fd60dce8c852 which caused more frequent failures of test_touch().
2020-10-19Relaxed some query ordering assertions in expressions tests.Tim Graham
It accounts for differences seen on CockroachDB.
2020-10-19Fixed #32107 -- Fixed ProtectedError.protected_objects and ↵Hasan Ramezani
RestrictedError.restricted_objects. Regression in 4ca5c565f4dc9e97845036e86416abc5cfde766c and ab3cbd8b9a315911248227208630a020cedca08f. Thanks Vitaliy Yelnik for the report.
2020-10-19Added DatabaseFeatures.can_alter_geometry_field.Tim Graham
2020-10-19Fixed #32116 -- Fixed QuerySet.order_by() crash on EmptyQuerySet with ↵Hannes Ljungberg
union() on a single non-empty ordered queryset.
2020-10-18Made test_change_list_sorting_model_admin_reverse's assertions more specific.Tim Graham
The test could fail on databases like CockroachDB that use non-serial primary keys if the numbers (2000, etc.) appeared in the pk values.
2020-10-17Fixed #32110 -- Doc'd and tested enumerations for ChoiceField.choices.Claude Paroz
2020-10-17Fixed #6517 -- Made dbshell use charset option on MySQL.manav014
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>