Skip to content

Commit

Permalink
chore: update test pinecone to mock
Browse files Browse the repository at this point in the history
  • Loading branch information
FacerAin committed Dec 6, 2023
1 parent 6925fc5 commit 985516a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


def test_completion(monkeypatch):
def mockreturn(a, b):
def mockreturn(*args, **kwargs):
return "Hello"

monkeypatch.setattr(ExecutorAgent, "run", mockreturn)
Expand All @@ -22,10 +22,11 @@ def mockreturn(a, b):


def test_similarity_search(monkeypatch):
def mockreturn(a, b):
def mockreturn(*args, **kwargs):
return "Hello"

monkeypatch.setattr(PineconeRetriever, "get_relevant_doc_string", mockreturn)
monkeypatch.setattr(PineconeRetriever, "get_pinecone_index", mockreturn)
monkeypatch.setattr(pinecone, "init", mockreturn)

response = client.get("/api/v1/chat/similarity-search?query=Hi")
Expand Down

0 comments on commit 985516a

Please sign in to comment.