Example #1
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.can(Permission.COMMENT))
     self.assertFalse(u.can(Permission.WRITE))
     self.assertFalse(u.can(Permission.MODERATE))
     self.assertFalse(u.can(Permission.ADMIN))
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.can(Permission.SUGGEST_EDIT))
     self.assertFalse(u.can(Permission.APPROVE_EDIT))
     self.assertFalse(u.can(Permission.ADD))
     self.assertFalse(u.can(Permission.ADMIN))
Example #3
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.can(Permission.COMMENT))
     self.assertFalse(u.can(Permission.WRITE))
     self.assertFalse(u.can(Permission.MODERATE))
     self.assertFalse(u.can(Permission.ADMIN))
Example #4
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.SEARCH))
     self.assertFalse(u.can(Permission.ENTRY))
     self.assertFalse(u.can(Permission.EDIT))
     self.assertFalse(u.can(Permission.MODERATE))
     self.assertFalse(u.can(Permission.ADMIN))
Example #5
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.OPEN_TICKET))
     self.assertFalse(u.can(Permission.RESPOND_TICKET))
     self.assertFalse(u.can(Permission.CLOSE_TICKET))
     self.assertFalse(u.can(Permission.MODERATE_TICKETS))
     self.assertFalse(u.can(Permission.ADMIN))
Example #6
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.can(Permission.WRITE))
     self.assertFalse(u.can(Permission.MODERATE))
     self.assertFalse(u.can(Permission.ADMIN))
     self.assertFalse(u.is_administrator())
Example #7
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.can(Permission.COMMENT))
     self.assertFalse(u.can(Permission.WRITE_ARTICLES))
     self.assertFalse(u.can(Permission.MODERATE_COMMENTS))
     self.assertFalse(u.can(Permission.ADMINISTER))
Example #8
0
 def test_anonymoususer_permission(self):
     Role.insert_roles()
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.can(Permission.COMMENT))
     self.assertFalse(u.can(Permission.WRITE))
     self.assertFalse(u.can(Permission.MODERATE))
     self.assertFalse(u.can(Permission.ADMIN))
Example #9
0
 def test_anonymous_user(self):
     """
     :summary: 测试匿名用户的权限
     :return:
     """
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
Example #10
0
    def test_anonymous_user(self):

        '''
            test for anonymous User
        :return: None
        '''

        u = AnonymousUser()
        self.assertFalse(u.can(Permission.SUBMIT_CODE))
Example #11
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.OWN_BOILER_ACCESS))
     self.assertFalse(u.can(Permission.ALL_BOILERS_ACCESS))
     self.assertFalse(u.can(Permission.BOILER_DATA_UPLOAD))
     self.assertFalse(u.can(Permission.USER_REGISTER))
     self.assertFalse(u.can(Permission.REPORT_DOWNLOAD))
     self.assertFalse(u.can(Permission.EDIT_BOILER_DATA))
     self.assertFalse(u.can(Permission.CREATE_BOILER))
     self.assertFalse(u.can(Permission.VIEW_PROFILES))
Example #12
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.POST_ACTIVITIES))
Example #13
0
 def test_anonymoususers_permission(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.COMMENT))
Example #14
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.PATIENT_PERMISSION))
Example #15
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertTrue(u.can(Permission.BUY))
     self.assertFalse(u.can(Permission.VIEW))
     self.assertFalse(u.can(Permission.ADMIN))
Example #16
0
 def test_anonymous_user(self):
     user = AnonymousUser()
     self.assertFalse(user.can(Permissions.ADDNOTES))
     self.assertFalse(user.can(Permissions.ADMIN))
     self.assertFalse(user.can(Permissions.MYNOTES))
Example #17
0
 def test_anonymous(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.GENERAL))
Example #18
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.WRITE_ARTICLES))
Example #19
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.WRITE_ARTICLES))
     self.assertFalse(u.can(Permission.WRITE_COMMENT))
     self.assertFalse(u.can(Permission.ADMIN_CONTENT))
     self.assertFalse(u.can(Permission.ADMIN_USER))
Example #20
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.UPLOAD))
     self.assertFalse(u.is_administrator())
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.CREATE_POSTS))
Example #22
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.ADMINISTER))
Example #23
0
 def test_anonymous_user_permissions(self):
     user = AnonymousUser()
     self.assertFalse(user.can(Permission.WRITE_CONTENT))
     self.assertFalse(user.can(Permission.REVIEW_CONTENT))
     self.assertFalse(user.can(Permission.PUBLISH_CONTENT))
     self.assertFalse(user.is_administrator())
 def test_anonymous_user(self):
     """Test the permissions of an anonymous user."""
     user = AnonymousUser()
     self.assertFalse(user.can(Permission.ADMIN))
     self.assertFalse(user.can(Permission.SPONSOR_EVENT))
     self.assertFalse(user.can(Permission.CREATE_EVENT))
Example #25
0
 def test_anonymous_user(self):
     """Permissions are correctly applied for anonymous users."""
     user = AnonymousUser()
     self.assertFalse(user.can(Permission.VIEW_CONTENT))
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.COMMENT))
Example #27
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     assert not u.can(Permission.VIEW_REPORT)
Example #28
0
 def test_anonymous_user(self):
     '''这是测试匿名用户的权限'''
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
Example #29
0
 def test_user_can(self):
     u = AnonymousUser()
     assert not u.can('default')
Example #30
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.WRITE_ARTICLES))
Example #31
0
 def test_anonymous(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.GENERAL))
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.SAVE_ENTRY))
Example #33
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
Example #34
0
 def test_anonymous(self):
     u = AnonymousUser()
     assert not u.can(Permissions.LIKE)
Example #35
0
 def test_anonymous_user(self):
     """testing ---> anonymous user"""
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.WRITE_ARTICLES))
Example #36
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.CHALLENGE))
Example #37
0
 def test_anonymous_user(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
Example #38
0
 def test_anonymous_permissions(self):
     u = AnonymousUser()
     self.assertFalse(u.can(Permission.FOLLOW))
     self.assertFalse(u.is_administrator)