Skip to content

Commit dd62f94

Browse files
committed
Fix integration tests
1 parent 94b9da9 commit dd62f94

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

tests/functional/adapter/simple_snapshot/test_various_configs.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def text_replace(input: str) -> str:
6060
invalidate_sql_2 = """
6161
-- invalidate records 11 - 21
6262
update {schema}.snapshot_expected set
63-
test_valid_to = updated_at + interval '1 hour'
63+
TEST_VALID_TO = updated_at + interval '1 hour'
6464
where id >= 10 and id <= 20;
6565
"""
6666

@@ -75,7 +75,7 @@ def text_replace(input: str) -> str:
7575
invalidate_multi_key_sql_2 = """
7676
-- invalidate records 11 - 21
7777
update {schema}.snapshot_expected set
78-
test_valid_to = updated_at + interval '1 hour'
78+
TEST_VALID_TO = updated_at + interval '1 hour'
7979
where id1 >= 10 and id1 <= 20;
8080
"""
8181

@@ -129,7 +129,7 @@ def project_config_update(self):
129129
"snapshots": {
130130
"test": {
131131
"+snapshot_meta_column_names": {
132-
"dbt_valid_to": "test_valid_to",
132+
"dbt_valid_to": "TEST_VALID_TO",
133133
"dbt_valid_from": "test_valid_from",
134134
"dbt_scd_id": "test_scd_id",
135135
"dbt_updated_at": "test_updated_at",
@@ -175,7 +175,7 @@ def project_config_update(self):
175175
"snapshots": {
176176
"test": {
177177
"+snapshot_meta_column_names": {
178-
"dbt_valid_to": "test_valid_to",
178+
"dbt_valid_to": "TEST_VALID_TO",
179179
"dbt_valid_from": "test_valid_from",
180180
"dbt_scd_id": "test_scd_id",
181181
"dbt_updated_at": "test_updated_at",
@@ -195,7 +195,7 @@ def test_snapshot_invalid_column_names(self, project):
195195
manifest = get_manifest(project.project_root)
196196
snapshot_node = manifest.nodes["snapshot.test.snapshot_actual"]
197197
snapshot_node.config.snapshot_meta_column_names == {
198-
"dbt_valid_to": "test_valid_to",
198+
"dbt_valid_to": "TEST_VALID_TO",
199199
"dbt_valid_from": "test_valid_from",
200200
"dbt_scd_id": "test_scd_id",
201201
"dbt_updated_at": "test_updated_at",
@@ -210,7 +210,7 @@ def test_snapshot_invalid_column_names(self, project):
210210
"snapshots": {
211211
"test": {
212212
"+snapshot_meta_column_names": {
213-
"dbt_valid_to": "test_valid_to",
213+
"dbt_valid_to": "TEST_VALID_TO",
214214
"dbt_updated_at": "test_updated_at",
215215
}
216216
}
@@ -236,7 +236,7 @@ def models(self):
236236
"ref_snapshot.sql": ref_snapshot_sql,
237237
}
238238

239-
def test_valid_to_current(self, project):
239+
def TEST_VALID_TO_current(self, project):
240240
project.run_sql(create_seed_sql)
241241
project.run_sql(create_snapshot_expected_sql)
242242
project.run_sql(seed_insert_sql)
@@ -247,7 +247,7 @@ def test_valid_to_current(self, project):
247247

248248
original_snapshot: Table = run_sql_with_adapter(
249249
project.adapter,
250-
"select id, test_scd_id, test_valid_to from {schema}.snapshot_actual",
250+
"select id, test_scd_id, TEST_VALID_TO from {schema}.snapshot_actual",
251251
"all",
252252
)
253253
assert original_snapshot[0][2] == datetime.datetime(
@@ -269,7 +269,7 @@ def test_valid_to_current(self, project):
269269

270270
updated_snapshot: Table = run_sql_with_adapter(
271271
project.adapter,
272-
"select id, test_scd_id, test_valid_to from {schema}.snapshot_actual",
272+
"select id, test_scd_id, TEST_VALID_TO from {schema}.snapshot_actual",
273273
"all",
274274
)
275275
print(updated_snapshot)

0 commit comments

Comments
 (0)