import unittest from datetime import datetime, timezone import password_substring class FreshFileTests(unittest.TestCase): def test_keeps_only_files_younger_than_flag_window(self) -> None: now = datetime(2026, 11, 29, 12, 0, tzinfo=timezone.utc) rows = [ {"id": "fresh", "created_at": "2026-11-29T11:58:30"}, {"id": "expired", "created_at": "2026-11-29T11:54:00"}, ] self.assertEqual(password_substring.fresh_file_ids(rows, now), ["fresh"]) if __name__ == "__main__": unittest.main()