From 58ea696cca4f17ae8e4de43cee826335dc060498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez-Mondrag=C3=B3n?= Date: Wed, 20 Mar 2024 12:57:36 -0600 Subject: [PATCH] Enable batch tests --- tests/test_target_snowflake.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/test_target_snowflake.py b/tests/test_target_snowflake.py index 50341cb..54f94eb 100644 --- a/tests/test_target_snowflake.py +++ b/tests/test_target_snowflake.py @@ -12,6 +12,7 @@ from target_snowflake.target import TargetSnowflake +from .batch import batch_target_tests from .core import target_tests SAMPLE_CONFIG: dict[str, Any] = { @@ -70,20 +71,20 @@ class TestTargetSnowflake(BaseSnowflakeTargetTests, StandardTargetTests): # typ # # Custom so I can implement all validate methods -# BATCH_TEST_CONFIG = copy.deepcopy(SAMPLE_CONFIG) -# BATCH_TEST_CONFIG["default_target_schema"] = f"TARGET_SNOWFLAKE_{uuid.uuid4().hex[0:6]!s}" -# BATCH_TEST_CONFIG["add_record_metadata"] = False -# BatchTargetTests = get_target_test_class( -# target_class=TargetSnowflake, -# config=BATCH_TEST_CONFIG, -# custom_suites=[batch_target_tests], -# suite_config=None, -# include_target_tests=False, -# ) - - -# class TestTargetSnowflakeBatch(BaseSnowflakeTargetTests, BatchTargetTests): # type: ignore[misc, valid-type] -# """Batch Target Tests.""" +BATCH_TEST_CONFIG = copy.deepcopy(SAMPLE_CONFIG) +BATCH_TEST_CONFIG["default_target_schema"] = f"TARGET_SNOWFLAKE_{uuid.uuid4().hex[0:6]!s}" +BATCH_TEST_CONFIG["add_record_metadata"] = False +BatchTargetTests = get_target_test_class( + target_class=TargetSnowflake, + config=BATCH_TEST_CONFIG, + custom_suites=[batch_target_tests], + suite_config=None, + include_target_tests=False, +) + + +class TestTargetSnowflakeBatch(BaseSnowflakeTargetTests, BatchTargetTests): # type: ignore[misc, valid-type] + """Batch Target Tests.""" def test_invalid_database():