From 10e5b00dd6f619692a8c1e833c3fcd3a6a99724f Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Mon, 1 Apr 2024 23:03:23 -0700 Subject: [PATCH] ActivityPubUtilsTest.test_convert_follow_as1_no_from_user: avoid network fetches --- tests/test_activitypub.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_activitypub.py b/tests/test_activitypub.py index 0bf94c1..daeafd5 100644 --- a/tests/test_activitypub.py +++ b/tests/test_activitypub.py @@ -2175,6 +2175,10 @@ class ActivityPubUtilsTest(TestCase): ignore=['to', 'attachment']) def test_convert_follow_as1_no_from_user(self): + # prevent HTTP fetches to infer protocol + self.store_object(id='https://mas.to/6d1a', source_protocol='activitypub') + self.store_object(id='https://user.com/', source_protocol='web') + obj = Object(our_as1=as2.to_as1(FOLLOW)) self.assert_equals(FOLLOW, common.unwrap(ActivityPub.convert(obj)), ignore=['to'])