james_marcogliese
05/03/2023, 1:42 PMtest_core.py
which contains the following snippet which runs the built-in tests along with any custom suites:
# 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!