I’m working on adding a multiple-database test for ticket #16281.
The test is for hitting an admin URL - I’m creating a user, logging the test client in, but then the view sees the request as from an anonymous user when I call response = self.client.get(<url>, follow=True)
.
I get the same result whether I call result = self.client.login(username='super', password='secret')
or self.client.force_login(user)
. I can see the session cookie in self.client.cookies
, but then the view still sees the user as anonymous.
Any suggestions?