Lines Matching defs:mock
4 import unittest.mock
55 no_chdir = unittest.mock.patch('os.chdir',
681 @unittest.mock.patch('os.chmod')
1890 with unittest.mock.patch('os.confstr', return_value=self.dir, \
1908 with unittest.mock.patch('os.confstr', return_value=self.dir, \
1924 with unittest.mock.patch('os.confstr', side_effect=ValueError, \
1931 with unittest.mock.patch('os.confstr', return_value=self.dir, \
2376 with unittest.mock.patch("shutil._copyfileobj_readinto") as m:
2389 with unittest.mock.patch("shutil._copyfileobj_readinto") as m:
2398 with unittest.mock.patch("shutil._copyfileobj_readinto") as m:
2447 with unittest.mock.patch('shutil.copyfileobj') as m:
2480 with unittest.mock.patch(self.PATCHPOINT,
2489 with unittest.mock.patch(self.PATCHPOINT,
2498 with unittest.mock.patch(self.PATCHPOINT,
2539 with unittest.mock.patch('os.sendfile', create=True,
2551 with unittest.mock.patch('os.fstat', side_effect=OSError) as m:
2562 mock = unittest.mock.Mock()
2563 mock.st_size = 65536 + 1
2564 with unittest.mock.patch('os.fstat', return_value=mock) as m:
2575 mock = unittest.mock.Mock()
2576 mock.st_size = self.FILESIZE + (100 * 1024 * 1024)
2577 with unittest.mock.patch('os.fstat', return_value=mock) as m:
2584 with unittest.mock.patch('os.sendfile',
2607 with unittest.mock.patch(
2616 with unittest.mock.patch(self.PATCHPOINT) as m: