HttpRequestMock: Add 404s on OStatus fetching for info.pleroma.site
This commit is contained in:
parent
3e298cc85a
commit
c51b2abead
@ -845,6 +845,10 @@ defmodule HttpRequestMock do
|
|||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get("https://info.pleroma.site/activity.json", _, _, _) do
|
||||||
|
{:ok, %Tesla.Env{status: 404, body: ""}}
|
||||||
|
end
|
||||||
|
|
||||||
def get("https://info.pleroma.site/activity2.json", _, _, Accept: "application/activity+json") do
|
def get("https://info.pleroma.site/activity2.json", _, _, Accept: "application/activity+json") do
|
||||||
{:ok,
|
{:ok,
|
||||||
%Tesla.Env{
|
%Tesla.Env{
|
||||||
@ -853,6 +857,10 @@ defmodule HttpRequestMock do
|
|||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get("https://info.pleroma.site/activity2.json", _, _, _) do
|
||||||
|
{:ok, %Tesla.Env{status: 404, body: ""}}
|
||||||
|
end
|
||||||
|
|
||||||
def get("https://info.pleroma.site/activity3.json", _, _, Accept: "application/activity+json") do
|
def get("https://info.pleroma.site/activity3.json", _, _, Accept: "application/activity+json") do
|
||||||
{:ok,
|
{:ok,
|
||||||
%Tesla.Env{
|
%Tesla.Env{
|
||||||
@ -861,6 +869,10 @@ defmodule HttpRequestMock do
|
|||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get("https://info.pleroma.site/activity3.json", _, _, _) do
|
||||||
|
{:ok, %Tesla.Env{status: 404, body: ""}}
|
||||||
|
end
|
||||||
|
|
||||||
def get(url, query, body, headers) do
|
def get(url, query, body, headers) do
|
||||||
{:error,
|
{:error,
|
||||||
"Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{
|
"Not implemented the mock response for get #{inspect(url)}, #{query}, #{inspect(body)}, #{
|
||||||
|
Loading…
Reference in New Issue
Block a user