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'])
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)