Skip to content

Commit

Permalink
chore: delete test_similarity_search for offline
Browse files Browse the repository at this point in the history
  • Loading branch information
FacerAin committed Dec 6, 2023
1 parent 985516a commit bbf488e
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,6 @@ def mockreturn(*args, **kwargs):
assert "Hello" == response.json()["answer"]


def test_similarity_search(monkeypatch):
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")
assert response.status_code == 200
assert isinstance(response.text, str)
assert '"Hello"' == response.text


@pytest.mark.live
def test_live_completion():
req_body = {"query": "Hi"}
Expand Down

0 comments on commit bbf488e

Please sign in to comment.