Example #1
0
 def test_is_authenticated_4(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
     }
     user = AbstractUser(**user_data)
     self.assertFalse(user.is_authenticated())
Example #2
0
 def test_is_authenticated_4(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
     }
     user = AbstractUser(**user_data)
     self.assertFalse(user.is_authenticated())
Example #3
0
 def test_get_fullname(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_user': True
     }
     user = AbstractUser(**user_data)
     self.assertEqual(user.get_fullname(), 'test user')
Example #4
0
 def test_is_authenticated_3(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_user': True
     }
     user = AbstractUser(**user_data)
     self.assertTrue(user.is_authenticated())
Example #5
0
 def test_is_authenticated_3(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_user': True
     }
     user = AbstractUser(**user_data)
     self.assertTrue(user.is_authenticated())
Example #6
0
 def test_get_fullname(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_user': True
     }
     user = AbstractUser(**user_data)
     self.assertEqual(user.get_fullname(), 'test user')
Example #7
0
    def test_is_active_setter(self):
        user_data = {
            'first_name': 'test',
            'last_name': 'user',
            'is_user': True
        }
        user = AbstractUser(**user_data)

        self.assertTrue(user.is_active)
        user.is_active = False
        self.assertFalse(user.is_active)
Example #8
0
    def test_is_active_setter(self):
        user_data = {
            'first_name': 'test',
            'last_name': 'user',
            'is_user': True
        }
        user = AbstractUser(**user_data)

        self.assertTrue(user.is_active)
        user.is_active = False
        self.assertFalse(user.is_active)
Example #9
0
 def test_is_anonymous_1(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
     }
     user = AbstractUser(**user_data)
     self.assertTrue(user.is_anonymous)
Example #10
0
 def test_is_active_getter_2(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_super': False
     }
     user = AbstractUser(**user_data)
     self.assertFalse(user.is_superuser)
Example #11
0
 def test_is_staff_2(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_staff': False
     }
     user = AbstractUser(**user_data)
     self.assertFalse(user.is_staff)
Example #12
0
 def test_change_user_credentials_2(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_user': True
     }
     user = AbstractUser(**user_data)
     self.assertFalse(user.is_anonymous)
Example #13
0
 def test_is_superuser_1(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
         'is_superuser': True
     }
     user = AbstractUser(**user_data)
     self.assertTrue(user.is_superuser)
Example #14
0
 def test_create_anonymous(self):
     user_data = {
         'first_name': 'test',
         'last_name': 'user',
     }
     user = AbstractUser(**user_data)
     self.assertFalse(user.is_superuser)
     self.assertFalse(user.is_staff)
     self.assertFalse(user.is_user)
     self.assertTrue(user.is_anonymous)
Example #15
0
 def test_change_user_credentials_1(self):
     user = AbstractUser()
     self.assertTrue(user.is_anonymous)
Example #16
0
 def test_get_fullname_for_anonymous(self):
     user = AbstractUser()
     self.assertEqual(user.get_fullname(), '')
Example #17
0
 def test_get_fullname_for_anonymous(self):
     user = AbstractUser()
     self.assertEqual(user.get_fullname(), '')