cpython/Lib/test/test_unittest/testmock
Robert Collins 422c4fc855
gh-119600: mock: do not access attributes of original when new_callable is set (#119601)
In order to patch flask.g e.g. as in #84982, that
proxies getattr must not be invoked. For that,
mock must not try to read from the original
object. In some cases that is unavoidable, e.g.
when doing autospec. However, patch("flask.g",
new_callable=MagicMock) should be entirely safe.
2024-06-11 06:41:12 +01:00
..
__init__.py
__main__.py
support.py gh-119600: mock: do not access attributes of original when new_callable is set (#119601) 2024-06-11 06:41:12 +01:00
testasync.py
testcallable.py
testhelpers.py
testmagicmethods.py
testmock.py gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (#118163) 2024-05-02 18:36:35 +01:00
testpatch.py gh-119600: mock: do not access attributes of original when new_callable is set (#119601) 2024-06-11 06:41:12 +01:00
testsealable.py
testsentinel.py
testthreadingmock.py
testwith.py