Skip to content

Commit bf4b3ff

Browse files
olieideltomchristie
authored andcommitted
Fix token param in force_authenticate example (#5284)
related_name for Token is `auth_token`, not `token`.
1 parent 52e0f3a commit bf4b3ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api-guide/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For example, when forcibly authenticating using a token, you might do something
8282

8383
user = User.objects.get(username='olivia')
8484
request = factory.get('/accounts/django-superstars/')
85-
force_authenticate(request, user=user, token=user.token)
85+
force_authenticate(request, user=user, token=user.auth_token)
8686

8787
---
8888

0 commit comments

Comments
 (0)