dlt-hub / verified-sources

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

rest_api: refactors incremental API call test to mock #519

Closed willi-mueller closed 2 months ago

willi-mueller commented 3 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.