diff options
author | Andrew Godwin | 2022-11-20 11:37:26 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-11-20 11:37:26 -0700 |
commit | 7a4f9cf29327803597cd39a46df159df4fbabe6c (patch) | |
tree | dea0896006852cbc291d3c00068e537927a1a985 /users/tests/test_activitypub.py | |
parent | ef910c53b7537cff385510c446bb7e2498875194 (diff) | |
download | takahe-7a4f9cf29327803597cd39a46df159df4fbabe6c.tar.gz takahe-7a4f9cf29327803597cd39a46df159df4fbabe6c.tar.bz2 takahe-7a4f9cf29327803597cd39a46df159df4fbabe6c.zip |
Add error catching on actor fetch
Diffstat (limited to 'users/tests/test_activitypub.py')
-rw-r--r-- | users/tests/test_activitypub.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/users/tests/test_activitypub.py b/users/tests/test_activitypub.py index 7c5e789..72ab8c3 100644 --- a/users/tests/test_activitypub.py +++ b/users/tests/test_activitypub.py @@ -4,7 +4,6 @@ from users.models import Domain, Identity, User @pytest.mark.django_db -@pytest.mark.xfail def test_webfinger_actor(client): """ Ensures the webfinger and actor URLs are working properly @@ -16,7 +15,7 @@ def test_webfinger_actor(client): domain.users.add(user) # Make an identity for them identity = Identity.objects.create( - actor_uri="https://example.com/@test@example.com/actor/", + actor_uri="https://example.com/@test@example.com/", username="test", domain=domain, name="Test User", @@ -28,5 +27,5 @@ def test_webfinger_actor(client): assert data["subject"] == "acct:test@example.com" assert data["aliases"][0] == "https://example.com/@test/" # Fetch their actor - data = client.get("/@test@example.com/actor/").json() - assert data["id"] == "https://example.com/@test@example.com/actor/" + data = client.get("/@test@example.com/", HTTP_ACCEPT="application/ld+json").json() + assert data["id"] == "https://example.com/@test@example.com/" |