#17758: Do not depend on dict order in test suite ---------------------------------+------------------------------------ Reporter: lrekucki | Owner: Alex Type: Bug | Status: new Component: Core (Other) | Version: 1.3 Severity: Release blocker | Resolution: Keywords: | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ---------------------------------+------------------------------------
Comment (by aaugustin): The following tests still fail when hash randomization is enabled: - `fixtures`, `fixtures_regress`, `m2m_through_regress`: they compare serialised JSON and XML representations. Possible solution: add `assertJSONEqual` to Django's `TestCase`. - `admin_filters`, `admin_views`: they compare query strings, whose order is no longer deterministic. Possible solution: add `assertQueryStringEqual` to Django's `TestCase`. [https://github.com/django/django/blob/195bc37f1d251eb7b5bc4d5f916f3b08745a504f/tests/regressiontests/httpwrappers/tests.py#L152 This technique] also works but it isn't practical. - `forms`: `<span class="foo bar">` and `<span class="bar foo">` are equivalent, but `assertHTMLEquals` doesn't knows. - `feedgenerator`: this test looks for a hard coded string in XML, which depends on attributes order. -- Ticket URL: <https://code.djangoproject.com/ticket/17758#comment:24> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.