The new test fixtures/factories in SDK v0.19.0 is ...
# singer-tap-development
q
The new test fixtures/factories in SDK v0.19.0 is super exciting! I’m trying to use it in tap-postgres and am getting an error, wondering if I’m doing something obviously wrong here; if not I’ll raise an issue.
Copy code
_ ERROR at setup of TestTapPostgres.test_tap_stream_catalog_schema_matches_record _
file /Users/quinn/Library/Caches/pypoetry/virtualenvs/tap-postgres-ng67kfVD-py3.10/lib/python3.10/site-packages/singer_sdk/testing/templates.py, line 165
      def run(  # type: ignore[override]
E       fixture 'stream' not found
More deets in thread
Trying to stay as close as possible to the example from the docs here
Copy code
from singer_sdk.testing import get_tap_test_class
import pendulum
from tap_postgres.tap import TapPostgres

SAMPLE_CONFIG = {
    "start_date": pendulum.datetime(2022,11,1).to_iso8601_string(),
    "sqlalchemy_url": "<postgresql://postgres:postgres@localhost:5432/postgres>",
}

TestTapPostgres = get_tap_test_class(
    tap_class=TapPostgres,
    config=SAMPLE_CONFIG,

)
Seems like StreamTestTemplate.run is expecting a stream fixture(?) but isn’t getting it?