From 1fa12e56c63e68f4821487b7bd03303b2f048806 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 6 Jan 2024 18:04:50 +0000 Subject: [PATCH] Remove unused test cases in test_openai.py --- tests/llm/test_openai.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tests/llm/test_openai.py b/tests/llm/test_openai.py index d1c63c63..445de223 100644 --- a/tests/llm/test_openai.py +++ b/tests/llm/test_openai.py @@ -10,23 +10,3 @@ class TestOpenAILLM(unittest.TestCase): def test_init(self): self.assertEqual(self.llm.api_key, self.api_key) - - @patch('application.llm.openai.openai.ChatCompletion.create') - def test_gen(self, mock_create): - model = "test_model" - engine = "test_engine" - messages = ["test_message"] - response = {"choices": [{"message": {"content": "test_response"}}]} - mock_create.return_value = response - result = self.llm.gen(model, engine, messages) - self.assertEqual(result, "test_response") - - @patch('application.llm.openai.openai.ChatCompletion.create') - def test_gen_stream(self, mock_create): - model = "test_model" - engine = "test_engine" - messages = ["test_message"] - response = [{"choices": [{"delta": {"content": "test_response"}}]}] - mock_create.return_value = response - result = list(self.llm.gen_stream(model, engine, messages)) - self.assertEqual(result, ["test_response"])