Exemplo n.º 1
0
    def test_parent_actions_are_serialized(self):
        obj = self._get_mocked_obj()

        obj_actions = serializer._serialize_available_action(obj, {})

        expected_result = {'name': 'method3', 'enabled': True}
        self.assertIn('id1_method3', obj_actions)
        self.assertEqual(expected_result, obj_actions['id1_method3'])
Exemplo n.º 2
0
    def test_parent_actions_are_serialized(self):
        obj = self._get_mocked_obj()

        obj_actions = serializer._serialize_available_action(obj, {})

        expected_result = {'name': 'method3', 'enabled': True}
        self.assertIn('id1_method3', obj_actions)
        self.assertEqual(expected_result, obj_actions['id1_method3'])
Exemplo n.º 3
0
 def test_that_only_actions_are_serialized(self):
     obj = self._get_mocked_obj()
     obj_actions = serializer._serialize_available_action(obj, {})
     self.assertNotIn('id1_method2', obj_actions)
Exemplo n.º 4
0
 def test_that_only_actions_are_serialized(self):
     obj = self._get_mocked_obj()
     obj_actions = serializer._serialize_available_action(obj, {})
     self.assertNotIn('id1_method2', obj_actions)