dlt-hub / dlt

data load tool (dlt) is an open source Python library that makes data loading easy 🛠️
https://dlthub.com/docs
Apache License 2.0
2.65k stars 175 forks source link

refactor Session mocking in RESTClient test suite #1890

Closed willi-mueller closed 1 month ago

willi-mueller commented 1 month ago

dlt version

1.0

Describe the problem

the mocking of sessions in tests/sources/helpers/rest_client/test_client.py is not idiomatic.

Expected behavior

use mocker.spy() and mocker.patch.object() respectively.

Steps to reproduce

look at the code

Operating system

Linux

Runtime environment

Local

Python version

3.11

dlt data source

No response

dlt destination

No response

Other deployment details

No response

Additional information

No response