Open anhqle opened 1 month ago
DJClient sends request via RequestsSessionWithEndPoint, which raise_for_status() when it encounters errors https://github.com/DataJunction/dj/blob/0d8a10e9d324b7fe92675ca45fcea714abeff6db/datajunction-clients/python/datajunction/_internal.py#L105
DJClient
RequestsSessionWithEndPoint
raise_for_status()
In contrast, the session pytest fixture does NOT raise and just returns the response from the server (I think) https://github.com/DataJunction/dj/blob/9b56770b74366eb68a9dd300c3f95b414acc217a/datajunction-clients/python/tests/conftest.py#L244
session
This difference between fixture and the actual object causes misleading test results
DJClient
sends request viaRequestsSessionWithEndPoint
, whichraise_for_status()
when it encounters errors https://github.com/DataJunction/dj/blob/0d8a10e9d324b7fe92675ca45fcea714abeff6db/datajunction-clients/python/datajunction/_internal.py#L105In contrast, the
session
pytest fixture does NOT raise and just returns the response from the server (I think) https://github.com/DataJunction/dj/blob/9b56770b74366eb68a9dd300c3f95b414acc217a/datajunction-clients/python/tests/conftest.py#L244This difference between fixture and the actual object causes misleading test results