Skip to content

Commit

Permalink
Test SQL target capabilities info
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Dec 20, 2023
1 parent 154ca15 commit a05c8af
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Empty file added tests/core/targets/__init__.py
Empty file.
32 changes: 32 additions & 0 deletions tests/core/targets/test_target_sql.py
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit a05c8af

Please sign in to comment.