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

james_marcogliese

05/03/2023, 1:42 PM
Hello! 👋 I’m finishing up development of a new (soon to be) public tap for openexchangerates using the Meltano SDK, and I had a question about testing. When creating a tap with the newest version of the SDK, it creates a
test_core.py
which contains the following snippet which runs the built-in tests along with any custom suites:
Copy code
# Run standard built-in tap tests from the SDK:
TestTapopenexchangerates = get_tap_test_class(
    tap_class=Tapopenexchangerates,
    config=SAMPLE_CONFIG,
    custom_suites=[tap_stream_test_suite, tap_tap_test_suite]
)
If live credentials are supplied as SAMPLE_CONFIG, the tests run as expected but hit an actual endpoint ($$). Obviously, I’ve like to mock responses so that fake credentials can be used. I’ve tried placing the above code block in scope of a requests mock in the hope that all the underlying requests would be mocked, including using the requests-mock package to do so, but I can’t seem to have the underlying requests pick up the mock. Am I making a mistake due to a fundamental misunderstanding of how this is supposed to work? Has anyone run into a similar issue? Tried searching through the messages in this channel but couldn’t find much. Thanks!