Beispiel #1
0
    def test_parent_actions_are_serialized(self):
        obj = self._get_mocked_obj()

        obj_actions = results_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'])
Beispiel #2
0
    def test_parent_actions_are_serialized(self):
        obj = self._get_mocked_obj()

        obj_actions = results_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'])
Beispiel #3
0
 def test_that_only_actions_are_serialized(self):
     obj = self._get_mocked_obj()
     obj_actions = results_serializer._serialize_available_action(obj)
     self.assertNotIn('id1_method2', obj_actions)
Beispiel #4
0
 def test_that_only_actions_are_serialized(self):
     obj = self._get_mocked_obj()
     obj_actions = results_serializer._serialize_available_action(obj)
     self.assertNotIn('id1_method2', obj_actions)