Skip to content

Commit

Permalink
remove databricks dependency in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaYurasov committed Dec 28, 2024
1 parent ac15b37 commit c58ca18
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
1 change: 1 addition & 0 deletions dbt_af/parser/dbt_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class Profile(BaseModel):

class Profiles(BaseModel):
profiles_config: dict[str, Any] = Field(alias='config', default_factory=dict)
flags: dict[str, Any] = Field(default_factory=dict)

@root_validator
def validate_profiles(cls, values: dict[str, Any]) -> dict[str, Any]:
Expand Down
6 changes: 4 additions & 2 deletions tests/airflow_dags/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_dbt_profiles_yaml_for_test():
'threads': 1,
}
dbt_profiles = {
'config': {'send_anonymous_usage_stats': False},
'flags': {'send_anonymous_usage_stats': False},
'main_profile': {
'target': 'dev',
'outputs': {
Expand Down Expand Up @@ -272,8 +272,10 @@ def mock_mcd_callbacks(mocker):
@pytest.fixture
def dbt_manifest(mocker):
from dbt.adapters.postgres.impl import PostgresAdapter
from dbt.task.runnable import GraphRunnableTask

mocker.patch.object(PostgresAdapter, 'list_relations_without_caching', lambda *args, **kwargs: [])
mocker.patch.object(PostgresAdapter, 'set_relations_cache', return_value=None)
mocker.patch.object(GraphRunnableTask, 'execute_nodes', return_value=[])

@contextlib.contextmanager
def _dbt_manifest(fixture_name):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This information is a Trade Secret of Toloka

version: 2

models:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This information is a Trade Secret of Toloka

version: 2

models:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ version: 2

sources:
- name: ext_tables
catalog: a
schema: raw

freshness:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This information is a Trade Secret of Toloka

version: 2

models:
Expand Down

0 comments on commit c58ca18

Please sign in to comment.