예제 #1
0
 def test_datetime(self):
     v = { 'datetime': datetime.datetime(2012, 4, 11, 11, 3, 0) }
     self.assertEqual(solrjson.dumps(v), '{"datetime": "2012-04-11T11:03:00Z"}')
예제 #2
0
 def test_time(self):
     v = { 'time': datetime.time(11, 3, 0) }
     self.assertEqual(solrjson.dumps(v), '{"time": "11:03:00"}')
예제 #3
0
 def test_int(self):
     v = { 'int': 123 }
     self.assertEqual(solrjson.dumps(v), '{"int": 123}')
예제 #4
0
 def test_date(self):
     v = { 'date': datetime.date(2012, 4, 11) }
     self.assertEqual(solrjson.dumps(v), '{"date": "2012-04-11"}')
예제 #5
0
 def test_int(self):
     v = {'int': 123}
     self.assertEqual(solrjson.dumps(v), '{"int": 123}')
예제 #6
0
 def test_time(self):
     v = {'time': datetime.time(11, 3, 0)}
     self.assertEqual(solrjson.dumps(v), '{"time": "11:03:00"}')
예제 #7
0
 def test_date(self):
     v = {'date': datetime.date(2012, 4, 11)}
     self.assertEqual(solrjson.dumps(v), '{"date": "2012-04-11"}')
예제 #8
0
 def test_datetime(self):
     v = {'datetime': datetime.datetime(2012, 4, 11, 11, 3, 0)}
     self.assertEqual(solrjson.dumps(v),
                      '{"datetime": "2012-04-11T11:03:00Z"}')