Exemplo n.º 1
0
 def test_iso_timestamp_with_ms(self):
     d = datetime(2012, 01, 01, 10, 30, 45, 434000)
     data = process_data_timestamp({
         'timestamp': '2012-01-01T10:30:45.434'
     }, current_datetime=d)
     self.assertTrue('timestamp' in data)
     self.assertEquals(data['timestamp'], d)
Exemplo n.º 2
0
 def test_timestamp_iso_timestamp_with_Z(self):
     data = process_data_timestamp({
         'timestamp': '2012-01-01T10:30:45Z'
     })
     d = datetime.datetime(2012, 01, 01, 10, 30, 45)
     self.assertTrue('timestamp' in data)
     self.assertEquals(data['timestamp'], d)
Exemplo n.º 3
0
 def test_timestamp_iso_timestamp_with_Z(self):
     data = process_data_timestamp({
         'timestamp': '2012-01-01T10:30:45Z'
     })
     d = datetime.datetime(2012, 01, 01, 10, 30, 45)
     self.assertTrue('timestamp' in data)
     self.assertEquals(data['timestamp'], d)
Exemplo n.º 4
0
 def test_timestamp_iso_timestamp_with_Z(self):
     d = datetime(2012, 01, 01, 10, 30, 45)
     data = process_data_timestamp({
         'timestamp': '2012-01-01T10:30:45Z'
     }, current_datetime=d)
     self.assertTrue('timestamp' in data)
     self.assertEquals(data['timestamp'], 1325413845.0)
Exemplo n.º 5
0
 def test_iso_timestamp(self):
     d = datetime(2012, 01, 01, 10, 30, 45)
     data = process_data_timestamp({
         'timestamp': '2012-01-01T10:30:45'
     }, current_datetime=d)
     self.assertTrue('timestamp' in data)
     self.assertEquals(data['timestamp'], d)
Exemplo n.º 6
0
 def test_iso_timestamp_with_ms(self):
     d = datetime(2012, 01, 01, 10, 30, 45, 434000)
     data = process_data_timestamp({
         'timestamp': '2012-01-01T10:30:45.434'
     }, current_datetime=d)
     self.assertTrue('timestamp' in data)
     self.assertEquals(data['timestamp'], 1325413845.0)
Exemplo n.º 7
0
Arquivo: tests.py Projeto: vine/sentry
 def test_timestamp_iso_timestamp_with_Z(self):
     data = process_data_timestamp({"timestamp": "2012-01-01T10:30:45Z"})
     d = datetime.datetime(2012, 01, 01, 10, 30, 45)
     self.assertTrue("timestamp" in data)
     self.assertEquals(data["timestamp"], d)