#15988: django.contrib.contenttypes.tests.ContentTypesTests.test_shortcut_view doesn't handle ABSOLUTE_URL_OVERRIDES ----------------------------------+-------------------------------------- Reporter: paltman | Owner: nobody Type: Cleanup/optimization | Status: new Milestone: | Component: contrib.contenttypes Version: 1.3 | Severity: Normal Keywords: | Triage Stage: Unreviewed Has patch: 1 | Easy pickings: 0 ----------------------------------+-------------------------------------- When using ABSOLUTE_URL_OVERRIDES setting, the shortcut_view_test causes test failures.
For example, I have: {{{ ABSOLUTE_URL_OVERRIDES = { "auth.user": lambda o: "/profiles/profile/%s/" % o.username, } }}} and so when running ./manage.py test I get: {{{ ====================================================================== FAIL: test_shortcut_view (django.contrib.contenttypes.tests.ContentTypesTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/patrick/.virtualenvs/vv/lib/python2.7/site- packages/django/contrib/contenttypes/tests.py", line 70, in test_shortcut_view response._headers.get("location")[1]) AssertionError: u'http://mydomain.o1.gondor.io/users/john/' != 'http://mydomain.o1.gondor.io/profiles/profile/john/' }}} I expected this test to handle the case of ABSOLUTE_URL_OVERRIDES being used. Attached is my patch to the test to match this expectation. -- Ticket URL: <http://code.djangoproject.com/ticket/15988> 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 this group at http://groups.google.com/group/django-updates?hl=en.