def test_findRename(self): with utils.temporary_dir() as d: path = os.path.join(d, "foo") with open(path, "w") as f: f.write("aa") logger = mock.Mock() utils.findRename("foo", "bar", d, logger) logger.info.assert_called_once() self.assertEqual(os.listdir(d), ["bar"])
def test_findRename(self): with temporary_dir() as d: path = os.path.join(d, 'foo') with open(path, 'w') as f: f.write('aa') logger = mock.Mock() utils.findRename('foo', 'bar', d, logger) logger.info.assert_called_once() self.assertEqual(os.listdir(d), ['bar'])