Skip to content

Commit

Permalink
fix: A test that depends on TimeZone was failing in workflow
Browse files Browse the repository at this point in the history
Introduced on #6 implementation.
  • Loading branch information
hirak99 committed Jan 10, 2025
1 parent 287a6c0 commit 88c72e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/code/snap_holder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ def test_filecontent(self):
self.assertEqual(snap.metadata._to_file_content(), {"snap_type": "UNKNOWN"})

snap.set_ttl("1 hour", now=_NOW)

expected_expiry_ts = (_NOW + datetime.timedelta(hours=1)).timestamp()
self.assertEqual(
snap.metadata._to_file_content(),
{"snap_type": "UNKNOWN", "expiry": 1738222200.0},
{"snap_type": "UNKNOWN", "expiry": expected_expiry_ts},
)

# Setting to empty string erases ttl.
Expand Down

0 comments on commit 88c72e8

Please sign in to comment.