From b6edc367532a42cd91161450c8deb829e4d3780c Mon Sep 17 00:00:00 2001 From: OMEGARAZER <869111+OMEGARAZER@users.noreply.github.com> Date: Sun, 1 Jan 2023 03:46:08 -0500 Subject: [PATCH] Update connector for 7 digit ID's --- bdfr/connector.py | 2 +- tests/test_connector.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bdfr/connector.py b/bdfr/connector.py index bf50f32d..1583e37a 100644 --- a/bdfr/connector.py +++ b/bdfr/connector.py @@ -301,7 +301,7 @@ def resolve_user_name(self, in_name: str) -> str: def get_submissions_from_link(self) -> list[list[praw.models.Submission]]: supplied_submissions = [] for sub_id in self.args.link: - if len(sub_id) == 6: + if len(sub_id) in (6, 7): supplied_submissions.append(self.reddit_instance.submission(id=sub_id)) else: supplied_submissions.append(self.reddit_instance.submission(url=sub_id)) diff --git a/tests/test_connector.py b/tests/test_connector.py index 9681e4b1..bf781e20 100644 --- a/tests/test_connector.py +++ b/tests/test_connector.py @@ -167,6 +167,7 @@ def test_create_authenticator(downloader_mock: MagicMock): ("lvpf4l",), ("lvpf4l", "lvqnsn"), ("lvpf4l", "lvqnsn", "lvl9kd"), + ("1000000",), ), ) def test_get_submissions_from_link(