def get_previewdata(cls, pydata): """ Get the data that should be added to the data preview box. :return: A string containing the data. """ return JsonContentType.dumps(pydata)
def test_json_dumps(self): from datetime import date with self.assertRaises(ContentTypeDumpError): JsonContentType.dumps(date(2010, 1, 1))