Beispiel #1
0
    def test_lazy_date_time_encoder_dates(self):
        encoder = LazyDateTimeEncoder()

        ts = datetime.now()
        self.assertEqual(encoder.encode(ts), '"%s"' % ts.isoformat())

        ts = date(2015, 5, 3)
        self.assertEqual(encoder.encode(ts), '"%s"' % ts.isoformat())
Beispiel #2
0
    def test_lazy_date_time_encoder_dates(self):
        encoder = LazyDateTimeEncoder()

        ts = datetime.now()
        self.assertEqual(encoder.encode(ts), '"%s"' % ts.isoformat())

        ts = date(2015, 5, 3)
        self.assertEqual(encoder.encode(ts), '"%s"' % ts.isoformat())
Beispiel #3
0
 def test_lazy_date_time_encoder_dict(self):
     encoder = LazyDateTimeEncoder()
     self.assertEqual(encoder.encode({'key': 1}), '{"key": 1}')
Beispiel #4
0
 def test_lazy_date_time_encoder_dict(self):
     encoder = LazyDateTimeEncoder()
     self.assertEqual(encoder.encode({'key': 1}), '{"key": 1}')