Skip to content

Commit 7f8daa9

Browse files
bmihelachramezani
authored andcommitted
Fix admin fixture in example
1 parent 639012d commit 7f8daa9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/helpers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ Example
161161

162162
from myapp.views import my_view
163163

164-
def test_details(rf, admin):
164+
def test_details(rf, admin_user):
165165
request = rf.get('/customer/details')
166166
# Remember that when using RequestFactory, the request does not pass
167167
# through middleware. If your view expects fields such as request.user
168168
# to be set, you need to set them explicitly.
169169
# The following line sets request.user to an admin user.
170-
request.user = admin
170+
request.user = admin_user
171171
response = my_view(request)
172172
assert response.status_code == 200
173173

0 commit comments

Comments
 (0)