Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for archive log type "6" #235

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pycaching/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ def from_filename(cls, filename):
elif filename == "68":
# 2 different IDs for post_reviewer_note
return cls.post_reviewer_note
elif filename == "6":
# 2 different IDs for archive
return cls.archive
elif filename == "1":
# 2 different IDs for unarchive
return cls.unarchive
Expand Down
2 changes: 2 additions & 0 deletions test/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ class TestType(unittest.TestCase):
def test_from_filename(self):
with self.subTest("valid types"):
self.assertEqual(Type.found_it, Type.from_filename("2"))
self.assertEqual(Type.archive, Type.from_filename("5"))
self.assertEqual(Type.visit, Type.from_filename("75"))

with self.subTest("special valid types"):
self.assertEqual(Type.visit, Type.from_filename("1001"))
self.assertEqual(Type.publish_listing, Type.from_filename("1003"))
self.assertEqual(Type.archive, Type.from_filename("6"))
self.assertEqual(Type.unarchive, Type.from_filename("1"))

with self.subTest("invalid type"):
Expand Down
Loading