Exemplo n.º 1
0
    def test_chmod(self):
        mocked_chmod = MagicMock()

        with patch('gitfs.views.passthrough.os.chmod', mocked_chmod):
            view = PassthroughView(repo=self.repo, repo_path=self.repo_path)

            view.chmod('/magic/path', 0777)

            mocked_chmod.assert_called_once_with('/the/root/path/magic/path',
                                                 0777)
Exemplo n.º 2
0
    def test_chmod(self):
        mocked_chmod = MagicMock()

        with patch("gitfs.views.passthrough.os.chmod", mocked_chmod):
            view = PassthroughView(repo=self.repo, repo_path=self.repo_path)

            view.chmod("/magic/path", 0o777)

            mocked_chmod.assert_called_once_with("/the/root/path/magic/path",
                                                 0o777)