🐛 fix(__main__.py): make database_url parameter optional in update_settings function

🐛 fix(llms.py): add name check before checking if "azure" is in name.lower()
🔨 refactor(test_database.py): rename updated_flow_style variable to to_update_flow_style for clarity
The update_settings function now has an optional database_url parameter to allow for more flexibility in updating settings. The llms.py file now checks if the name variable is not None before checking if "azure" is in name.lower(). In test_database.py, the updated_flow_style variable is renamed to to_update_flow_style for clarity.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-06-06 16:30:34 -03:00
commit 1d33933d64
3 changed files with 5 additions and 4 deletions

View file

@ -299,9 +299,9 @@ def test_update_flow_style(client: TestClient):
flow_style = FlowStyleCreate(color="red", emoji="🔴")
response = client.post("api/v1/flow_styles/", json=flow_style.dict())
created_flow_style = FlowStyleRead(**response.json())
updated_flow_style = FlowStyleUpdate(color="blue")
to_update_flow_style = FlowStyleUpdate(color="blue")
response = client.patch(
f"api/v1/flow_styles/{created_flow_style.id}", json=updated_flow_style.dict()
f"api/v1/flow_styles/{created_flow_style.id}", json=to_update_flow_style.dict()
)
assert response.status_code == 200
updated_flow_style = FlowStyleRead(**response.json())