1👍
✅
force_authenticate()
takes a user object for the user
arguement, not the string of the username.
So in your case you’d use
self.client.force_authenticate(user=self.admin)
Source:stackexchange.com