예제 #1
0
    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"])
예제 #2
0
    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"])
예제 #3
0
    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'])