Not quite sure what to expect when running `poetry...
# meltano-plugin-development
a
Not quite sure what to expect when running
poetry run pytest
on a pretty simple tap. I'm getting this error for every property in the stream. Any ideas? Do I need to mock responses somewhere?
Copy code
ERROR tests/test_core.py::TestTapFreshservice::test_tap_stream_attribute_is_integer[tickets.group_id] - singer_sdk.exceptions.FatalAPIError: 403 Client Error: Forbidden for path: /tickets
e
Hey Adam 👋 You need to pass config to the tap. Put them in a
.env
file at the root of your repo:
Copy code
TAP_FRESHSERVICE_API_KEY=...
You should also probably make sure settings that are necessary for the tap to run use the
required=True
parameter so it fails early.
a
Do these tests call the API or mock the API?
e
They call the real API. I've been thinking how to expose tests that mock the API, but I'd either have to cache/store actual responses (which may have sensitive information), or write responses manually which is a lot of work with little added value. Let me know if you have ideas.