-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add initial functional test for catalog parsing
- Loading branch information
1 parent
926d4c5
commit 4a3e5e2
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from unittest import mock | ||
|
||
import pytest | ||
|
||
from dbt.tests.util import run_dbt, write_config_file | ||
|
||
|
||
class TestCatalogsParsing: | ||
|
||
@pytest.fixture | ||
def catalogs(self): | ||
return { | ||
"catalogs": [ | ||
{ | ||
"name": "test_catalog", | ||
"write_integrations": [ | ||
{ | ||
"name": "write_integration_name", | ||
"external_volume": "write_integration_external_volume", | ||
"table_format": "iceberg", | ||
"catalog_type": "glue", | ||
} | ||
], | ||
} | ||
] | ||
} | ||
|
||
def test_catalog_parsing_adapter_initialialization(self, catalogs, project): | ||
write_config_file(catalogs, project.project_root, "catalogs.yml") | ||
|
||
mock_set_catalog_integration = mock.Mock() | ||
with mock.patch.object( | ||
type(project.adapter), "set_catalog_integration", mock_set_catalog_integration | ||
): | ||
run_dbt(["run"]) | ||
mock_set_catalog_integration.assert_called_once() |