-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
154ca15
commit a05c8af
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |