Skip to content

Commit

Permalink
Apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
Hialus committed Jul 17, 2023
1 parent f3dd199 commit 1aa969b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions tests/routes/messages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
from app.services.guidance_wrapper import GuidanceWrapper
import app.config as config

llm_model_config = config.LLMModelConfig(name="test", description="test", llm_credentials={})
llm_model_config = config.LLMModelConfig(
name="test", description="test", llm_credentials={}
)
config.settings.pyris.llms = {"GPT35_TURBO": llm_model_config}
api_key_config = config.APIKeyConfig(token="secret", comment="test", llm_access=["GPT35_TURBO"])
api_key_config = config.APIKeyConfig(
token="secret", comment="test", llm_access=["GPT35_TURBO"]
)
config.settings.pyris.api_keys = [api_key_config]


Expand Down Expand Up @@ -51,7 +55,11 @@ def test_send_message_missing_model(test_client, headers):


def test_send_message_missing_params(test_client, headers):
response = test_client.post("/api/v1/messages", headers=headers, json={"preferredModel": "GPT35_TURBO"})
response = test_client.post(
"/api/v1/messages",
headers=headers,
json={"preferredModel": "GPT35_TURBO"},
)
assert response.status_code == 422
assert response.json() == {
"detail": [
Expand Down
4 changes: 3 additions & 1 deletion tests/services/guidance_wrapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
from app.services.guidance_wrapper import GuidanceWrapper
from app.config import LLMModelConfig

llm_model_config = LLMModelConfig(name="test", description="test", llm_credentials={})
llm_model_config = LLMModelConfig(
name="test", description="test", llm_credentials={}
)


def test_query_success(mocker):
Expand Down

0 comments on commit 1aa969b

Please sign in to comment.