Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
alphatownsman committed Feb 19, 2024
1 parent de769a7 commit 4e7c274
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/activities/models/test_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def test_fetch_post(httpx_mock: HTTPXMock, config_system):
"""
httpx_mock.add_response(
url="https://example.com/test-actor",
headers={"Content-Type": "application/activity+json"},
json={
"@context": [
"https://www.w3.org/ns/activitystreams",
Expand All @@ -23,6 +24,7 @@ def test_fetch_post(httpx_mock: HTTPXMock, config_system):
)
httpx_mock.add_response(
url="https://example.com/test-post",
headers={"Content-Type": "application/activity+json"},
json={
"@context": [
"https://www.w3.org/ns/activitystreams",
Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def test_search_not_found(httpx_mock: HTTPXMock, api_client):
@pytest.mark.parametrize(
"content_type",
[
"application/ld+json",
'application/ld+json; profile="https://www.w3.org/ns/activitystreams"',
"application/activity+json",
],
)
Expand Down
3 changes: 3 additions & 0 deletions tests/users/models/test_identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_fetch_actor(httpx_mock, config_system):
# Trigger actor fetch
httpx_mock.add_response(
url="https://example.com/.well-known/webfinger?resource=acct:[email protected]",
headers={"Content-Type": "application/activity+json"},
json={
"subject": "acct:[email protected]",
"aliases": [
Expand All @@ -130,6 +131,7 @@ def test_fetch_actor(httpx_mock, config_system):
)
httpx_mock.add_response(
url="https://example.com/test-actor/",
headers={"Content-Type": "application/activity+json"},
json={
"@context": [
"https://www.w3.org/ns/activitystreams",
Expand Down Expand Up @@ -170,6 +172,7 @@ def test_fetch_actor(httpx_mock, config_system):
)
httpx_mock.add_response(
url="https://example.com/test-actor/collections/featured/",
headers={"Content-Type": "application/activity+json"},
json={
"type": "Collection",
"totalItems": 1,
Expand Down

0 comments on commit 4e7c274

Please sign in to comment.