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

haleemur_ali

04/21/2023, 12:25 PM
Update: resolved. i had a typo somewhere that I was finally able to trace down. howdy folks, I developed a tap using the meltano SDK version 0.24.0. The process was easy, and I'm working on tests. The default tests are failing however, and I'm not sure how best to proceed. Below is my
test_core.py
file. I've traced the failure to
singer_sdk.testing.tap_tests.py::TapStreamConnectionTest
>>
singer_sdk.tap_base.py::Tap.run_connection_test
My question for the community is how best to mock the service for testing. If there are any code samples you can point me to that I can look at, I would understand the concept much better. Thanks, the
test_core.py
file contents.
Copy code
from singer_sdk.testing import get_standard_tap_tests

from tap_ukg_connect.tap import TapUKGConnect


SAMPLE_CONFIG = {
    "username": "api-user-name",
    "password": "api-key-secret",
    "us_customer_api_key": "customer-api-key",
    "api_url": "<http://mock-ukg-connect>"
}

def test_sdk_standard_tap_tests():
    """Run the built-in tap tests from the SDK."""
    tests = get_standard_tap_tests(TapUKGConnect, config=SAMPLE_CONFIG)
    for test in tests:
        breakpoint()
        test()