Exemplo n.º 1
0
    def test_child_ids_with_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.child_ids_with_permission(resource='fake', parent=None, children_type='fake', permission='fake')
Exemplo n.º 2
0
    def test_is_empty_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.is_empty()
Exemplo n.º 3
0
    def test_remove_all_permissions_for_target_ids_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_all_permissions_for_target_ids(target_ids='fake')
Exemplo n.º 4
0
    def test_has_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.has_permission(resource='fake', target='fake', permission='fake', explicit_only=False)
Exemplo n.º 5
0
    def test_remove_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_permission(resource='fake', target='fake', permission='fake')
Exemplo n.º 6
0
    def test_remove_all_permissions_of_resource_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_all_permissions_of_resource(resource='fake')
Exemplo n.º 7
0
    def test_remove_all_permissions_for_target_ids_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_all_permissions_for_target_ids(target_ids='fake')
Exemplo n.º 8
0
    def test_create_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.create_permission(resource='fake', target='fake', permission='fake', explicit=True, parent_permission_id='fake')
Exemplo n.º 9
0
    def test_is_empty_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.is_empty()
Exemplo n.º 10
0
    def test_remove_all_permissions_of_resource_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_all_permissions_of_resource(resource='fake')
Exemplo n.º 11
0
    def test_remove_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_permission(resource='fake',
                                     target='fake',
                                     permission='fake')
Exemplo n.º 12
0
    def test_child_ids_with_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.child_ids_with_permission(resource='fake',
                                             parent=None,
                                             children_type='fake',
                                             permission='fake')
Exemplo n.º 13
0
    def test_has_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.has_permission(resource='fake',
                                  target='fake',
                                  permission='fake',
                                  explicit_only=False)
Exemplo n.º 14
0
    def test_create_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.create_permission(resource='fake',
                                     target='fake',
                                     permission='fake',
                                     explicit=True,
                                     parent_permission_id='fake')
Exemplo n.º 15
0
 def test_methods(self):
     """
     """
     plugin = GAPermissionsPlugin()
     self.assertTrue(plugin.should_manage(resource_name='fake', identifier='fake'))
Exemplo n.º 16
0
 def test_methods(self):
     """
     """
     plugin = GAPermissionsPlugin()
     self.assertTrue(
         plugin.should_manage(resource_name='fake', identifier='fake'))