* Update setup.py requires and classifiers * Drop Python 2.7 and 3.4 from CI * Update docs dropping 2.7 and 3.4 support * Fix mock imports and remove tests related to pypi's mock module * Add py27 and 34 support docs to the sidebar * Remove usage of six from tmpdir * Remove six.PY* code blocks * Remove sys.version_info related code * Cleanup compat * Remove obsolete safe_str * Remove obsolete __unicode__ methods * Remove compat.PY35 and compat.PY36: not really needed anymore * Remove unused UNICODE_TYPES * Remove Jython specific code * Remove some Python 2 references from docs Related to #5275
18 lines
318 B
Python
18 lines
318 B
Python
# -*- coding: utf-8 -*-
|
|
"""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"
|