Skip to content

Commit

Permalink
Remove debug and add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
LoanR committed Aug 1, 2024
1 parent 8c1166a commit 94baa51
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions pod/activitypub/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion pod/activitypub/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 94baa51

Please sign in to comment.