From 44d9b6d1b18e16e648d2f2703abfb3611a4843b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Wy=C5=BCgowski?= Date: Fri, 12 Jul 2024 10:37:34 +0200 Subject: [PATCH] Extending MockViewBase with and methods. Silencing pandas linter error (TBD if this is going to be covered in this PR). --- src/dbally/views/pandas_base.py | 2 +- tests/unit/mocks.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dbally/views/pandas_base.py b/src/dbally/views/pandas_base.py index 3fd13b0b..f3a86cde 100644 --- a/src/dbally/views/pandas_base.py +++ b/src/dbally/views/pandas_base.py @@ -43,7 +43,7 @@ async def apply_aggregation(self, aggregation: IQLQuery) -> None: Args: aggregation: IQLQuery object representing the aggregation to apply """ - pass + pass # pylint: disable=unnecessary-pass async def build_filter_node(self, node: syntax.Node) -> pd.Series: """ diff --git a/tests/unit/mocks.py b/tests/unit/mocks.py index 75cc914b..ba77a8ce 100644 --- a/tests/unit/mocks.py +++ b/tests/unit/mocks.py @@ -29,6 +29,12 @@ def list_filters(self) -> List[ExposedFunction]: async def apply_filters(self, filters: IQLQuery) -> None: ... + def list_aggregations(self) -> List[ExposedFunction]: + return [] + + async def apply_aggregation(self, filters: IQLQuery) -> None: + ... + def execute(self, dry_run=False) -> ViewExecutionResult: return ViewExecutionResult(results=[], context={})