Esempio 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')
Esempio n. 2
0
    def test_is_empty_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.is_empty()
Esempio 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')
Esempio 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)
Esempio n. 5
0
    def test_remove_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_permission(resource='fake', target='fake', permission='fake')
Esempio 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')
Esempio 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')
Esempio 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')
Esempio n. 9
0
    def test_is_empty_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.is_empty()
Esempio 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')
Esempio n. 11
0
    def test_remove_permission_required(self):
        """
        """
        plugin = GAPermissionsPlugin()

        with self.assertRaises(NotImplementedError):
            plugin.remove_permission(resource='fake',
                                     target='fake',
                                     permission='fake')
Esempio 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')
Esempio 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)
Esempio 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')
Esempio n. 15
0
 def test_methods(self):
     """
     """
     plugin = GAPermissionsPlugin()
     self.assertTrue(plugin.should_manage(resource_name='fake', identifier='fake'))
Esempio n. 16
0
 def test_methods(self):
     """
     """
     plugin = GAPermissionsPlugin()
     self.assertTrue(
         plugin.should_manage(resource_name='fake', identifier='fake'))