-
Notifications
You must be signed in to change notification settings - Fork 7
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
f1bcf3c
commit cbbf56d
Showing
2 changed files
with
23 additions
and
41 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,13 +1,35 @@ | ||
"""Tests standard target features using the built-in SDK tests library.""" | ||
|
||
from pathlib import Path | ||
from typing import Any, Dict | ||
|
||
from singer_sdk.testing import get_target_test_class | ||
from singer_sdk.testing.suites import TestSuite | ||
from singer_sdk.testing.templates import TargetFileTestTemplate | ||
|
||
from target_csv.target import TargetCSV | ||
|
||
SAMPLE_CONFIG: Dict[str, Any] = { | ||
"escape_character": '"', | ||
} | ||
|
||
TestTargetCSV = get_target_test_class(TargetCSV, config=SAMPLE_CONFIG) | ||
|
||
class MultipleStreamsTest(TargetFileTestTemplate): | ||
name = "users_and_employees" | ||
|
||
@property | ||
def singer_filepath(self) -> Path: | ||
current_dir = Path(__file__).resolve().parent | ||
return current_dir / "data_files" / f"{self.name}.singer" | ||
|
||
|
||
TestTargetCSV = get_target_test_class( | ||
TargetCSV, | ||
config=SAMPLE_CONFIG, | ||
custom_suites=[ | ||
TestSuite( | ||
kind="target", | ||
tests=[MultipleStreamsTest], | ||
) | ||
], | ||
) |
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