Lines Matching refs:patch

5 from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call
19 with patch('%s.something' % __name__, sentinel.Something2):
26 with patch('%s.something' % __name__, sentinel.Something2):
33 with patch('%s.something' % __name__) as mock_something:
44 with patch.object(Foo, 'something'):
51 …with patch('%s.something' % __name__) as mock_something, patch('%s.something_else' % __name__) as …
61 with patch('%s.something' % __name__, sentinel.Patched) as mock_something:
90 with patch('%s.something' % __name__, sentinel.Patched) as mock_something:
93 with patch('%s.something' % __name__) as mock_again:
103 with patch('%s.something' % __name__) as mock_something:
106 with patch('%s.something_else' % __name__) as mock_something_else:
116 with patch.dict(foo, {'a': 'b'}):
121 with patch.dict(foo, {'a': 'b'}):
133 with patch.object(c, 'f', autospec=True) as patch1:
134 with patch.object(c, 'f', autospec=True) as patch2:
146 with patch('%s.open' % __name__, mock, create=True) as patched:
156 with patch('%s.open' % __name__, mock, create=True):
167 with patch('%s.open' % __name__, mock, create=True):
184 with patch('%s.open' % __name__, mock, create=True) as patched:
193 with patch('%s.open' % __name__, mock, create=True):
204 with patch('%s.open' % __name__, mock, create=True):
216 with patch('%s.open' % __name__, mock, create=True):
226 with patch('%s.open' % __name__, mock, create=True):
240 with patch('%s.open' % __name__, mock, create=True):
253 with patch('%s.open' % __name__, mock, create=True):
261 with patch('%s.open' % __name__, mock, create=True):
270 with patch('%s.open' % __name__, mock, create=True):
278 with patch('%s.open' % __name__, m, create=True):
290 with patch('%s.open' % __name__, m, create=True):
313 with patch('%s.open' % __name__, mock, create=True):
321 with patch('%s.open' % __name__, mock, create=True):