https://linen.dev logo
#singer-tap-development
Title
# singer-tap-development
m

Matt Menzenski

04/06/2023, 5:01 PM
How can I pass metadata configuration to an SDK-based Tap in a test? I’d like to test both incremental and log-based replication methods.
Copy code
import datetime
from singer_sdk.testing import get_tap_test_class
from tap_mongodb.tap import TapMongoDB

SAMPLE_CONFIG = {
    "start_date": datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d")
    # TODO: Initialize minimal tap config
}

# Run standard built-in tap tests from the SDK:
TestTapMongoDB = get_tap_test_class(tap_class=TapMongoDB, config=SAMPLE_CONFIG)

# TODO: Create additional tests as appropriate for your tap.