Skip to content

Commit

Permalink
Pre-commit fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrykWyzgowski committed Jul 19, 2024
1 parent 5511729 commit ae26c8b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/unit/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@
from dbally.iql import IQLQuery
from dbally.iql.syntax import FunctionCall
from dbally.views.exposed_functions import ExposedFunction, MethodParamWithTyping
from tests.unit.mocks import MockIQLGenerator, MockLLM, MockSimilarityIndex, MockViewBase, MockViewSelector, \
MockAggregationFormatter
from tests.unit.mocks import (
MockAggregationFormatter,
MockIQLGenerator,
MockLLM,
MockSimilarityIndex,
MockViewBase,
MockViewSelector,
)


class MockView1(MockViewBase):
Expand Down Expand Up @@ -298,7 +304,7 @@ async def test_ask_view_selection_single_view() -> None:
result = await collection.ask("Mock question")
assert result.view_name == "MockViewWithResults"
assert result.results == [{"foo": "bar"}]
assert result.context == {"baz": "qux", "iql": {'aggregation': 'test_aggregation()', 'filters': 'test_filter()'}}
assert result.context == {"baz": "qux", "iql": {"aggregation": "test_aggregation()", "filters": "test_filter()"}}


async def test_ask_view_selection_multiple_views() -> None:
Expand All @@ -319,7 +325,7 @@ async def test_ask_view_selection_multiple_views() -> None:
result = await collection.ask("Mock question")
assert result.view_name == "MockViewWithResults"
assert result.results == [{"foo": "bar"}]
assert result.context == {"baz": "qux", "iql": {'aggregation': 'test_aggregation()', 'filters': 'test_filter()'}}
assert result.context == {"baz": "qux", "iql": {"aggregation": "test_aggregation()", "filters": "test_filter()"}}


async def test_ask_view_selection_no_views() -> None:
Expand Down

0 comments on commit ae26c8b

Please sign in to comment.