mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 17:28:12 +02:00
Fixed broken local profile page when allow-list is enabled
This commit is contained in:
parent
9a37d3a8a9
commit
868dacdb62
2 changed files with 18 additions and 2 deletions
|
@ -215,6 +215,21 @@ def test_can_retrieve_actor(factories, api_client, preferences):
|
|||
assert response.data == expected
|
||||
|
||||
|
||||
def test_can_retrieve_local_actor_with_allow_list_enabled(
|
||||
factories, api_client, preferences
|
||||
):
|
||||
preferences["common__api_authentication_required"] = False
|
||||
preferences["moderation__allow_list_enabled"] = True
|
||||
actor = factories["federation.Actor"](local=True)
|
||||
url = reverse(
|
||||
"api:v1:federation:actors-detail", kwargs={"full_username": actor.full_username}
|
||||
)
|
||||
response = api_client.get(url)
|
||||
|
||||
expected = api_serializers.FullActorSerializer(actor).data
|
||||
assert response.data == expected
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"object_id, expected_url",
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue