Skip to content

Commit

Permalink
chore: remove refactored tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Dec 1, 2023
1 parent 57b012c commit eb7c7aa
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions models/tests/test_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
"""
Test integrity of base class.
"""
import pinecone
import pytest # pylint: disable=unused-import
from langchain.chat_models import ChatOpenAI
from langchain.embeddings import OpenAIEmbeddings
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.vectorstores.pinecone import Pinecone

from ..const import Credentials
from ..ssm import SalesSupportModel


Expand All @@ -30,20 +28,3 @@ def test_02_class_aatribute_types(self):
assert isinstance(ssm.pinecone_index, Pinecone)
assert isinstance(ssm.text_splitter, RecursiveCharacterTextSplitter)
assert isinstance(ssm.openai_embedding, OpenAIEmbeddings)

def test_03_test_openai_connectivity(self):
"""Ensure that we have connectivity to OpenAI."""

ssm = SalesSupportModel()
retval = ssm.cached_chat_request(
"your are a helpful assistant", "please return the value 'CORRECT' in all upper case."
)
assert retval == "CORRECT"

def test_04_test_pinecone_connectivity(self):
"""Ensure that we have connectivity to Pinecone."""
# pylint: disable=broad-except
try:
pinecone.init(api_key=Credentials.PINECONE_API_KEY, environment=Credentials.PINECONE_ENVIRONMENT)
except Exception as e:
assert False, f"pinecone.init() failed with exception: {e}"

0 comments on commit eb7c7aa

Please sign in to comment.