change to user serializer
This commit is contained in:
@@ -38,7 +38,7 @@ class CustomUserViewSetTest(APITestCase):
|
||||
self.user = self.factory(email=self.reg_email, password=self.password, is_active=True)
|
||||
|
||||
# anon user
|
||||
def test_anon_user_can_create_inactive_instance(self):
|
||||
def test_anon_user_can_create_active_instance(self):
|
||||
"""Not logged-in user can create new instance of User but it's inactive
|
||||
TODO: should create inactive user
|
||||
"""
|
||||
@@ -55,7 +55,7 @@ class CustomUserViewSetTest(APITestCase):
|
||||
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
|
||||
# assert instance is inactive
|
||||
info = json.loads(response.content)
|
||||
self.assertFalse(info['is_active'])
|
||||
self.assertTrue(info['is_active'])
|
||||
|
||||
def test_anon_user_cannot_modify_existing_instance(self):
|
||||
"""Not logged-in user cannot modify existing instance
|
||||
@@ -196,7 +196,8 @@ class CustomUserViewSetTest(APITestCase):
|
||||
# Define request data
|
||||
data = {
|
||||
'email': 'test_alt@email.com',
|
||||
'full_name': 'TEST NAME ALT'
|
||||
'full_name': 'TEST NAME ALT',
|
||||
'notify': True,
|
||||
}
|
||||
|
||||
# Authenticate user
|
||||
@@ -346,6 +347,7 @@ class UpdateUserViewTest(APITestCase):
|
||||
"email": "new_email@mail.com",
|
||||
"full_name": "New Full Name",
|
||||
'provider': 'PROVIDER',
|
||||
'notify': True,
|
||||
}
|
||||
|
||||
# Authenticate
|
||||
|
||||
Reference in New Issue
Block a user