Пример #1
0
 def test_is_deactivated(self):
     user = User(password='******',
                 role='administrator',
                 state='deactivated',
                 id='uid')
     result = user.is_admin()
     assert result is False
Пример #2
0
 def test_is_not_admin(self):
     user = User(password='******', role='user', id='uid')
     result = user.is_admin()
     assert result is False
Пример #3
0
 def test_is_admin(self):
     user = User(password='******', role='administrator', id='uid')
     result = user.is_admin()
     assert result is True
Пример #4
0
 def test_is_deactivated(self):
     user = User(password='******', role='administrator', state='deactivated', id='uid')
     result = user.is_admin()
     assert result is False
Пример #5
0
 def test_is_not_admin(self):
     user = User(password='******', role='user', id='uid')
     result = user.is_admin()
     assert result is False
Пример #6
0
 def test_is_admin(self):
     user = User(password='******', role='administrator', id='uid')
     result = user.is_admin()
     assert result is True