Lines Matching refs:mock_foo
592 >>> mock_foo = MagicMock()
593 >>> mock_foo.iter.return_value = iter([1, 2, 3])
594 >>> list(mock_foo.iter())
637 ... self.mock_foo = self.patcher.start()
640 ... self.assertIs(mymodule.foo, self.mock_foo)
656 ... self.mock_foo = patcher.start()
659 ... self.assertIs(mymodule.foo, self.mock_foo)
691 >>> with patch.object(Foo, 'foo', autospec=True) as mock_foo:
692 ... mock_foo.return_value = 'foo'
697 >>> mock_foo.assert_called_once_with(foo)
871 ... with patch('mymodule.Foo') as mock_foo:
874 ... assert mymodule.Foo is mock_foo
896 ... mock_foo = self.create_patch('mymodule.Foo')
900 ... assert mymodule.Foo is mock_foo
1124 >>> mock_foo = manager.foo
1127 >>> mock_foo.something()