Opened 2 years ago

Closed 2 years ago

#17691 closed Bug (duplicate)

conflict of django.contrib.auth with project's middleware

Reported by: andrey@… Owned by: nobody
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


If I add django-debug-toolbar middleware, which uses session access, test "Session not accessed will" fail:

Traceback (most recent call last):
  File "/Users/gugu/w/virtualenv/eksmo/src/django/django/contrib/auth/tests/", line 31, in test_session_not_accessed
    self.assertContains(response, "Session not accessed")
  File "/Users/gugu/w/virtualenv/eksmo/src/django/django/test/", line 538, in assertContains
    msg_prefix + "Couldn't find '%s' in response" % text)
AssertionError: Couldn't find 'Session not accessed' in response

You need to override middleware list to make this test working in all configurations

Attachments (1)

middleware.patch (896 bytes) - added by gugu 2 years ago.

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by gugu

comment:1 Changed 2 years ago by claudep

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #16366

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.