kiwicom / pytest-recording

A pytest plugin that allows recording network interactions via VCR.py
MIT License
441 stars 35 forks source link

[BUG] `block_network` is not working #150

Open mihalt opened 1 month ago

mihalt commented 1 month ago

I see that it works just if I use fixture @pytest.mark.block_network on test without @pytest.mark.vcr. I still have opportunity of go to network then. And even if I manually delete the cassette, it appears again. As I understand, it shouldn't be. I've tried to switch off globaly like

conftest.py

@pytest.fixture(scope="session")
def vcr_config():
    return {
        "block_network": True
    }

or pytest.ini

[pytest]
addopts = --block-network

And tests still can pass in the time when they should fail.