Beispiel #1
0
 def test_has_guest_access__anonymous_user(self):
     g.user = security_manager.get_anonymous_user()
     has_guest_access = security_manager.has_guest_access(
         GuestTokenResourceType.DASHBOARD, self.resource_id)
     self.assertFalse(has_guest_access)
Beispiel #2
0
 def test_get_guest_user__anonymous_user(self):
     g.user = security_manager.get_anonymous_user()
     guest_user = security_manager.get_current_guest_user_if_guest()
     self.assertIsNone(guest_user)
 def test_get_anonymous_roles(self, mock_g):
     mock_g.user = security_manager.get_anonymous_user()
     roles = security_manager.get_user_roles()
     self.assertEqual([security_manager.get_public_role()], roles)
Beispiel #4
0
 def test_is_guest_user__anonymous(self):
     is_guest = security_manager.is_guest_user(
         security_manager.get_anonymous_user())
     self.assertFalse(is_guest)
 def test_has_guest_access__anonymous_user(self):
     g.user = security_manager.get_anonymous_user()
     has_guest_access = security_manager.has_guest_access(self.dash)
     self.assertFalse(has_guest_access)