1
0
mirror of https://github.com/bspeice/metrik synced 2025-07-01 22:07:03 -04:00

Idiot forgot datetime was immutable

This commit is contained in:
bspeice
2016-09-06 21:15:36 -04:00
parent 061b4256fd
commit a44635c660
2 changed files with 4 additions and 5 deletions

View File

@ -54,8 +54,8 @@ class MongoTargetTest(MongoTest):
r = t.retrieve()
self.assertGreaterEqual(present, r['_created_at'])
one_second_past = present - timedelta(seconds=1)
second_prior = (present - timedelta(seconds=1)).replace(microsecond=0)
t = MongoTarget('test_collection', 1235)
t.persist({}, present=one_second_past)
t.persist({}, present=second_prior)
r = t.retrieve()
self.assertEqual(one_second_past, r['_created_at'])
self.assertEqual(second_prior, r['_created_at'])