forked from microsoft/dbt-fabric
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest_dbt_utils.py
More file actions
55 lines (47 loc) · 1.56 KB
/
Copy pathtest_dbt_utils.py
File metadata and controls
55 lines (47 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import pytest
from tests.packages.base_package_test import BaseDbtPackageTests
class TestDbtUtils(BaseDbtPackageTests):
@pytest.fixture(scope="class")
def models_config(self):
return {
"dbt_utils_integration_tests": {
"sql": {
"test_groupby": {"+enabled": False},
"test_urls": {"+enabled": False},
"test_unpivot_bool": {"+enabled": False},
}
}
}
@pytest.fixture(scope="class")
def macros(self):
return {
"limit_zero.sql": """
{% macro fabric__limit_zero() %}
{{ return('where 0=1') }}
{% endmacro %}"""
}
@pytest.fixture(scope="class")
def package_name(self) -> str:
return "dbt_utils"
@pytest.fixture(scope="class")
def package_repo(self) -> str:
return "https://github.com/dbt-labs/dbt-utils"
@pytest.fixture(scope="class")
def package_revision(self, dbt_utils_version) -> str:
return dbt_utils_version
@pytest.fixture(scope="class")
def seeds_config(self):
return {
"dbt_utils_integration_tests": {
"sql": {
"data_get_single_value": {
"+column_types": {"date_value": "datetime2(6)", "int_value": "int"}
}
},
"schema_tests": {
"data_test_sequential_timestamps": {
"+column_types": {"my_timestamp": "datetime2(6)"}
}
},
}
}