Lint and formatting fixes (#554)
Co-authored-by: cachho <admin@ch-webdev.com> Co-authored-by: Taranjeet Singh <reachtotj@gmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
|
||||
import os
|
||||
import unittest
|
||||
from unittest.mock import patch, MagicMock
|
||||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from embedchain import App
|
||||
from embedchain.config import AppConfig, BaseLlmConfig
|
||||
@@ -88,8 +87,8 @@ class TestApp(unittest.TestCase):
|
||||
|
||||
self.assertEqual(answer, "Test answer")
|
||||
_args, kwargs = mock_retrieve.call_args
|
||||
self.assertEqual(kwargs.get('input_query'), "Test query")
|
||||
self.assertEqual(kwargs.get('where'), {"attribute": "value"})
|
||||
self.assertEqual(kwargs.get("input_query"), "Test query")
|
||||
self.assertEqual(kwargs.get("where"), {"attribute": "value"})
|
||||
mock_answer.assert_called_once()
|
||||
|
||||
@patch("chromadb.api.models.Collection.Collection.add", MagicMock)
|
||||
@@ -120,6 +119,6 @@ class TestApp(unittest.TestCase):
|
||||
|
||||
self.assertEqual(answer, "Test answer")
|
||||
_args, kwargs = mock_database_query.call_args
|
||||
self.assertEqual(kwargs.get('input_query'), "Test query")
|
||||
self.assertEqual(kwargs.get('where'), {"attribute": "value"})
|
||||
self.assertEqual(kwargs.get("input_query"), "Test query")
|
||||
self.assertEqual(kwargs.get("where"), {"attribute": "value"})
|
||||
mock_answer.assert_called_once()
|
||||
|
||||
@@ -109,8 +109,8 @@ class TestApp(unittest.TestCase):
|
||||
|
||||
self.assertEqual(answer, "Test answer")
|
||||
_args, kwargs = mock_retrieve.call_args
|
||||
self.assertEqual(kwargs.get('input_query'), "Test query")
|
||||
self.assertEqual(kwargs.get('where'), {"attribute": "value"})
|
||||
self.assertEqual(kwargs.get("input_query"), "Test query")
|
||||
self.assertEqual(kwargs.get("where"), {"attribute": "value"})
|
||||
mock_answer.assert_called_once()
|
||||
|
||||
@patch("chromadb.api.models.Collection.Collection.add", MagicMock)
|
||||
@@ -142,6 +142,6 @@ class TestApp(unittest.TestCase):
|
||||
|
||||
self.assertEqual(answer, "Test answer")
|
||||
_args, kwargs = mock_database_query.call_args
|
||||
self.assertEqual(kwargs.get('input_query'), "Test query")
|
||||
self.assertEqual(kwargs.get('where'), {"attribute": "value"})
|
||||
self.assertEqual(kwargs.get("input_query"), "Test query")
|
||||
self.assertEqual(kwargs.get("where"), {"attribute": "value"})
|
||||
mock_answer.assert_called_once()
|
||||
|
||||
@@ -7,7 +7,6 @@ from chromadb.config import Settings
|
||||
|
||||
from embedchain import App
|
||||
from embedchain.config import AppConfig, ChromaDbConfig
|
||||
from embedchain.models import EmbeddingFunctions, Providers
|
||||
from embedchain.vectordb.chroma_db import ChromaDB
|
||||
|
||||
|
||||
@@ -86,7 +85,6 @@ class TestChromaDbHostsLoglevel(unittest.TestCase):
|
||||
"""
|
||||
Test if the `App` instance is initialized without a config that does not contain default hosts and ports.
|
||||
"""
|
||||
config = AppConfig(log_level="DEBUG")
|
||||
|
||||
_app = App(config=AppConfig(collect_metrics=False))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user