Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
pytest / testing / example_scripts / acceptance / fixture_mock_integration.py
Size: Mime:
"""Reproduces issue #3774"""
from unittest import mock

import pytest

config = {"mykey": "ORIGINAL"}


@pytest.fixture(scope="function")
@mock.patch.dict(config, {"mykey": "MOCKED"})
def my_fixture():
    return config["mykey"]


def test_foobar(my_fixture):
    assert my_fixture == "MOCKED"