Пример #1
0
 def pretty_service_answers(self, obj):
     """Return the service_answers field formatted with indentation."""
     return format_json_as_html(obj.service_answers)
Пример #2
0
 def test_format_json_as_html(self, value, expected_output):
     """Test that various values are serialised and escaped as expected."""
     assert format_json_as_html(value) == expected_output
Пример #3
0
 def pretty_source(self, obj):
     """
     Return the source field formatted with indentation.
     """
     return format_json_as_html(obj.source)
Пример #4
0
 def pretty_data(self, obj):
     """Returns the data field formatted with indentation."""
     return format_json_as_html(obj.data)