예제 #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'])
예제 #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'])
예제 #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)
예제 #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)