mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
remove import UserSerializer in tesf_drf_views.py
This commit is contained in:
parent
5a9648fa90
commit
29fea6efa3
|
@ -1,7 +1,6 @@
|
||||||
import pytest
|
import pytest
|
||||||
from django.test import RequestFactory
|
from django.test import RequestFactory
|
||||||
|
|
||||||
from {{ cookiecutter.project_slug }}.users.api.serializers import UserSerializer
|
|
||||||
from {{ cookiecutter.project_slug }}.users.api.views import UserViewSet
|
from {{ cookiecutter.project_slug }}.users.api.views import UserViewSet
|
||||||
from {{ cookiecutter.project_slug }}.users.models import User
|
from {{ cookiecutter.project_slug }}.users.models import User
|
||||||
|
|
||||||
|
@ -28,8 +27,8 @@ class TestUserViewSet:
|
||||||
response = view.me(request)
|
response = view.me(request)
|
||||||
|
|
||||||
assert response.data == {
|
assert response.data == {
|
||||||
"username": user.username,
|
"username": user.username,
|
||||||
"email": user.email,
|
"email": user.email,
|
||||||
"name": user.name,
|
"name": user.name,
|
||||||
"url": f"/api/users/{user.username}/",
|
"url": f"/api/users/{user.username}/",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user