diff --git a/tests/unit/test_ap-gateway.py b/tests/unit/test_ap-gateway.py index 6fcedfbf..eba51b9a 100644 --- a/tests/unit/test_ap-gateway.py +++ b/tests/unit/test_ap-gateway.py @@ -407,7 +407,9 @@ class TestActivityPubGateway: monkeypatch.setattr(plugin_comp_ap_gateway.treq, "json_content", mock_treq_json) monkeypatch.setattr(ap_gateway, "apGet", mock_ap_get) - items, rsm_resp = await ap_gateway.getAPItems(TEST_AP_ACCOUNT, 2) + actor_data = await ap_gateway.getAPActorDataFromId(TEST_AP_ACCOUNT) + outbox = await ap_gateway.apGetObject(actor_data, "outbox") + items, rsm_resp = await ap_gateway.getAPItems(outbox, 2) assert rsm_resp.count == 4 assert rsm_resp.index == 0 @@ -437,7 +439,7 @@ class TestActivityPubGateway: assert str(items[1].entry.published) == "2021-12-16T17:26:03Z" items, rsm_resp = await ap_gateway.getAPItems( - TEST_AP_ACCOUNT, + outbox, max_items=2, after_id="https://example.org/users/test_user/statuses/3", ) @@ -470,7 +472,7 @@ class TestActivityPubGateway: assert str(items[1].entry.published) == "2021-12-16T17:28:03Z" items, rsm_resp = await ap_gateway.getAPItems( - TEST_AP_ACCOUNT, + outbox, max_items=1, start_index=2 ) @@ -489,7 +491,7 @@ class TestActivityPubGateway: assert str(items[0].entry.published) == "2021-12-16T17:27:03Z" items, rsm_resp = await ap_gateway.getAPItems( - TEST_AP_ACCOUNT, + outbox, max_items=3, chronological_pagination=False )