Fix flakiness in a test when comparing date times

This commit is contained in:
Joseph Schorr 2017-12-14 14:00:20 -05:00
parent b2485934ed
commit 60bc655695

View file

@ -210,4 +210,4 @@ def test_change_tag_expiration(expiration_offset, expected_offset, initialized_d
start_date = datetime.utcfromtimestamp(footag_updated.lifetime_start_ts)
end_date = datetime.utcfromtimestamp(footag_updated.lifetime_end_ts)
expected_end_date = start_date + convert_to_timedelta(expected_offset)
assert end_date == expected_end_date
assert (expected_end_date - end_date).total_seconds() < 5 # variance in test