diff --git a/tests/core/targets/__init__.py b/tests/core/targets/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/core/targets/test_target_sql.py b/tests/core/targets/test_target_sql.py new file mode 100644 index 0000000000..50f25737c3 --- /dev/null +++ b/tests/core/targets/test_target_sql.py @@ -0,0 +1,32 @@ +from __future__ import annotations + +import typing as t + +from singer_sdk.helpers.capabilities import PluginCapabilities, TargetCapabilities +from singer_sdk.target_base import SQLTarget + + +class SQLTargetMock(SQLTarget): + name = "sql-target-mock" + config_jsonschema: t.ClassVar[dict] = {"properties": {}} + + +def test_target_about_info(): + target = SQLTargetMock() + about = target._get_about_info() + + assert about.capabilities == [ + PluginCapabilities.ABOUT, + PluginCapabilities.STREAM_MAPS, + PluginCapabilities.FLATTENING, + TargetCapabilities.TARGET_SCHEMA, + TargetCapabilities.HARD_DELETE, + ] + + assert "stream_maps" in about.settings["properties"] + assert "stream_map_config" in about.settings["properties"] + assert "flattening_enabled" in about.settings["properties"] + assert "flattening_max_depth" in about.settings["properties"] + assert "add_record_metadata" in about.settings["properties"] + assert "default_target_schema" in about.settings["properties"] + assert "hard_delete" in about.settings["properties"]