Lines Matching refs:patch

5 from unittest.mock import MagicMock, Mock, patch, sentinel, mock_open, call
17 with patch('%s.something' % __name__, sentinel.Something2):
24 with patch('%s.something' % __name__, sentinel.Something2):
35 with patch('%s.something' % __name__) as mock_something:
46 with patch.object(Foo, 'something'):
53 …with patch('%s.something' % __name__) as mock_something, patch('%s.something_else' % __name__) as …
63 with patch('%s.something' % __name__, sentinel.Patched) as mock_something:
92 with patch('%s.something' % __name__, sentinel.Patched) as mock_something:
95 with patch('%s.something' % __name__) as mock_again:
105 with patch('%s.something' % __name__) as mock_something:
108 with patch('%s.something_else' % __name__) as mock_something_else:
118 with patch.dict(foo, {'a': 'b'}):
123 with patch.dict(foo, {'a': 'b'}):
136 with patch.object(c, 'f', autospec=True) as patch1:
137 with patch.object(c, 'f', autospec=True) as patch2:
149 with patch('%s.open' % __name__, mock, create=True) as patched:
159 with patch('%s.open' % __name__, mock, create=True):
170 with patch('%s.open' % __name__, mock, create=True):
187 with patch('%s.open' % __name__, mock, create=True) as patched:
196 with patch('%s.open' % __name__, mock, create=True):
207 with patch('%s.open' % __name__, mock, create=True):
219 with patch('%s.open' % __name__, mock, create=True):
229 with patch('%s.open' % __name__, mock, create=True):
241 with patch('%s.open' % __name__, mock, create=True):
249 with patch('%s.open' % __name__, mock, create=True):
258 with patch('%s.open' % __name__, mock, create=True):
266 with patch('%s.open' % __name__, m, create=True):
278 with patch('%s.open' % __name__, m, create=True):
296 with patch('%s.open' % __name__, mock, create=True):
304 with patch('%s.open' % __name__, mock, create=True):