Open ubalklen opened 2 years ago
I forgot to mention that a cassette do get recorded after the failed test, but with a 401 UNAUTHORIZED
in its body, meaning there was an issue during the NTLM authentication.
Hey! Sorry for the delay.
I think the core reason is how VCR.py mocks requests
. I assume it doesn't create raw response (from urllib3
) when it takes response from a cassette. I.e. it should be fixed there, but I'd be happy to keep this issue open to track the progress.
I'm getting a
AttributeError: 'NoneType' object has no attribute 'raw'
when trying to record tests that access sites that use NTLM authentication via the requests pluginrequests-ntlm
.I don't know how to provide a reproducible sample without actually having a NTLM site, but here is a minimal code showing what is happening:
If I turn
pytest-recording
off, the test works:But if I turn it on: