Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Integration Tests #1011

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/griptape-framework/engines/audio-engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ from griptape.engines import TextToSpeechEngine
driver = ElevenLabsTextToSpeechDriver(
api_key=os.getenv("ELEVEN_LABS_API_KEY"),
model="eleven_multilingual_v2",
voice="Rachel",
voice="Laura",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny fix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No clue what happened to Rachel

)

engine = TextToSpeechEngine(
Expand Down
2 changes: 1 addition & 1 deletion griptape/drivers/sql/snowflake_sql_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def execute_query_raw(self, query: str) -> Optional[list[dict[str, Any]]]:

if results is not None:
if results.returns_rows:
return [dict(result.items()) for result in results]
return [dict(result._mapping) for result in results]
else:
return None
else:
Expand Down
7 changes: 4 additions & 3 deletions tests/unit/drivers/sql/test_snowflake_sql_driver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from dataclasses import dataclass
from typing import Any
from unittest import mock

import pytest
Expand Down Expand Up @@ -36,8 +37,8 @@ def mock_snowflake_engine(self, mocker):
items_mock = mocker.MagicMock(name="items")
items_mock_2 = mocker.MagicMock(name="items2")

items_mock.items.return_value = [("first_name", "Tony"), ("last_name", "Hawk")]
items_mock_2.items.return_value = [("first_name", "Bob"), ("last_name", "Ross")]
items_mock._mapping = [("first_name", "Tony"), ("last_name", "Hawk")]
items_mock_2._mapping = [("first_name", "Bob"), ("last_name", "Ross")]

result_mock.return_value.returns_rows = True
result_mock.__iter__.return_value = iter([items_mock, items_mock_2])
Expand Down Expand Up @@ -71,7 +72,7 @@ def get_connection():
return new_driver

def test_connection_function_wrong_return_type(self):
def get_connection():
def get_connection() -> Any:
return object

with pytest.raises(ValueError):
Expand Down
Loading