Closed AndreCimander closed 3 years ago
Hi,
Thank you for your detailed report!
I think that there are two related things.
First, the block_network
mark is not checked for input arguments - at this point, it should accept only allowed_hosts
, nothing else. I missed that originally, but it will be nice to check the input arguments (and for the vcr
mark as well to avoid typos)
Second, the record_mode
option is indeed ignored when it comes from the vcr_config
fixture or the vcr
mark. Network blocking is only tested together with the --record-mode
CLI option.
@AndreCimander
The fix is released in 0.12.0
; let me know if the fix solves your use case :)
Works like a charm, thank you for the quick reaction and fix! :+1:
Already planned to vendor a custom block_network as a quickfix(aka the cobblestones to hell :smile: ), which thankfully is now avoided.
Great to hear that! :)
Feel free to reach out to me if there are any other issues with pytest-recording
:)
Describe the bug Setting the
record_mode
via config fixture nor marker is not honored by block_network. The record_mode variable in block_network is still in default state"none"
.To Reproduce
Expected behavior Shouldn't raise a
RuntimeError
since we are supposed to be recording.Environment (please complete the following information):