Enable unaliased modules ex_slop check
This commit is contained in:
@@ -3,6 +3,7 @@ defmodule MusicLibrary.Chats.ArtistChatTest do
|
||||
|
||||
alias MusicLibrary.Artists.{Artist, ArtistInfo}
|
||||
alias MusicLibrary.Chats.ArtistChat
|
||||
alias Plug.Conn
|
||||
|
||||
defp build_artist(attrs \\ %{}) do
|
||||
defaults = %{
|
||||
@@ -44,13 +45,13 @@ defmodule MusicLibrary.Chats.ArtistChatTest do
|
||||
|
||||
defp stub_and_capture_instructions(test_pid) do
|
||||
Req.Test.stub(OpenAI.API, fn conn ->
|
||||
{:ok, body, conn} = Plug.Conn.read_body(conn)
|
||||
{:ok, body, conn} = Conn.read_body(conn)
|
||||
request = JSON.decode!(body)
|
||||
send(test_pid, {:captured_instructions, request["instructions"]})
|
||||
|
||||
conn
|
||||
|> Plug.Conn.put_resp_content_type("text/event-stream")
|
||||
|> Plug.Conn.send_resp(200, completed_response())
|
||||
|> Conn.put_resp_content_type("text/event-stream")
|
||||
|> Conn.send_resp(200, completed_response())
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user