From 94baa51984ed7779f5ca04ee7c1f25f1f5c49d1f Mon Sep 17 00:00:00 2001 From: Loan Robert Date: Thu, 1 Aug 2024 11:42:51 +0200 Subject: [PATCH] Remove debug and add docstring --- pod/activitypub/network.py | 3 --- pod/activitypub/tests/test_admin.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pod/activitypub/network.py b/pod/activitypub/network.py index c5e049098e..88d28eb84b 100644 --- a/pod/activitypub/network.py +++ b/pod/activitypub/network.py @@ -95,10 +95,7 @@ def index_external_videos_page(following: Following, page_url, indexed_external_ if "next" in ap_page: index_external_videos_page(following, ap_page["next"], indexed_external_videos) - print("COUCOUCOUCOUCOUCOUCOUC") - print(indexed_external_videos) ExternalVideo.objects.filter(source_instance=following).exclude(ap_id__in=indexed_external_videos).delete() - print("BLABLABLABLABLABLABLA") def index_external_video(following: Following, video_url): diff --git a/pod/activitypub/tests/test_admin.py b/pod/activitypub/tests/test_admin.py index 52e96fe453..dd04350c00 100644 --- a/pod/activitypub/tests/test_admin.py +++ b/pod/activitypub/tests/test_admin.py @@ -68,7 +68,7 @@ def test_reindex_external_videos(self): self.assertTrue(index_external_videos.called) def test_check_missing_external_videos_are_deleted_on_reindexation(self): - """Nominal case test for the admin 'reindex_external_videos' action.""" + """Reindexation should delete missing ExternalVideo on following instance.""" with open("pod/activitypub/tests/fixtures/peertube_video.json") as fd: payload = json.load(fd)