Exemple #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"}')
Exemple #2
0
 def test_time(self):
     v = { 'time': datetime.time(11, 3, 0) }
     self.assertEqual(solrjson.dumps(v), '{"time": "11:03:00"}')
Exemple #3
0
 def test_int(self):
     v = { 'int': 123 }
     self.assertEqual(solrjson.dumps(v), '{"int": 123}')
Exemple #4
0
 def test_date(self):
     v = { 'date': datetime.date(2012, 4, 11) }
     self.assertEqual(solrjson.dumps(v), '{"date": "2012-04-11"}')
Exemple #5
0
 def test_int(self):
     v = {'int': 123}
     self.assertEqual(solrjson.dumps(v), '{"int": 123}')
Exemple #6
0
 def test_time(self):
     v = {'time': datetime.time(11, 3, 0)}
     self.assertEqual(solrjson.dumps(v), '{"time": "11:03:00"}')
Exemple #7
0
 def test_date(self):
     v = {'date': datetime.date(2012, 4, 11)}
     self.assertEqual(solrjson.dumps(v), '{"date": "2012-04-11"}')
Exemple #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"}')