dlt-hub / verified-sources

Contribute to dlt verified sources 🔥
https://dlthub.com/docs/walkthroughs/add-a-verified-source
Apache License 2.0
74 stars 50 forks source link

rest_api: refactors incremental API call test to mock #519

Closed willi-mueller closed 4 months ago

willi-mueller commented 4 months ago

Tell us what you do here

Short description

This is a follow-up to #507

Additional Context

The previous test implementation relied on a mock server to listen to a specific route and return the data inside the request parameters. Now, we mock the request-sending method and assert that it was called with the expected parameters.

This makes the test run faster and uses less code.