Beispiel #1
0
    def test_register_function_with_diferent_name(self):
        @register_object_checker('new_name')
        def function_name(a, b, c):
            return True

        self.assertIn('new_name', PermissionsManager.get_checkers())

        restore_function = PermissionsManager.retrieve_checker('new_name')

        self.assertTrue(restore_function('', '', ''))
    def test_register_function_with_diferent_name(self):
        @register_object_checker('new_name')
        def function_name(a, b, c):
            return True

        self.assertIn('new_name', PermissionsManager.get_checkers())

        restore_function = PermissionsManager.retrieve_checker('new_name')

        self.assertTrue(restore_function('', '', ''))
Beispiel #3
0
 def test_get_checkers(self):
     self.assertEquals(PermissionsManager.get_checkers(), {})
 def test_get_checkers(self):
     self.assertEquals(PermissionsManager.get_checkers(), {})