def test_DateField_from_json_converts_date_object_to_isocoded_date(self): f = DateField() self.assertEquals("1975-07-10", f.to_json(datetime.datetime(1975, 7, 10)))
def test_DateField_from_json_converts_date_object_to_isocoded_date(self): f = DateField() self.assertEquals('1975-07-10', f.to_json(datetime.datetime(1975, 7, 10)))
def test_DateField_to_json_converts_isocoded_date_to_date_object(self): f = DateField() self.assertEquals(datetime.date(1975, 7, 10), f.from_json("1975-07-10"))
def test_DateField_to_json_converts_isocoded_date_to_date_object(self): f = DateField() self.assertEquals(datetime.date(1975, 7, 10), f.from_json('1975-07-10'))