예제 #1
0
파일: test_vcs.py 프로젝트: jackqu7/Facio
    def test_git_not_installed_clone_exception(self, mock_sh, mock_exit):
        instance = GitVCS('git+/foo/bar')

        with self.assertRaises(FacioException):
            instance.clone()
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: Git must be installed to use git+ template paths')
예제 #2
0
    def test_git_not_installed_clone_exception(self, mock_sh, mock_exit):
        instance = GitVCS('git+/foo/bar')

        with self.assertRaises(FacioException):
            instance.clone()
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: Git must be installed to use git+ template paths')
예제 #3
0
파일: test_vcs.py 프로젝트: jackqu7/Facio
    def test_git_clone_fail_exception_raised(self, mock_clone, mock_exit):
        instance = GitVCS('git+/foo/bar')

        with self.assertRaises(FacioException):
            instance.clone()
        self.assertTrue(mock_exit.called)
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: Failed to clone git repository at /foo/bar')
예제 #4
0
    def test_git_clone_fail_exception_raised(self, mock_clone, mock_exit):
        instance = GitVCS('git+/foo/bar')

        with self.assertRaises(FacioException):
            instance.clone()
        self.assertTrue(mock_exit.called)
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: Failed to clone git repository at /foo/bar')
예제 #5
0
파일: test_vcs.py 프로젝트: jackqu7/Facio
    def test_calls_to_git(self, mock_git, mock_tempfile):
        instance = GitVCS('git+/foo/bar')
        instance.clone()

        mock_git.bake.assert_called_with(_cwd='/tmp/foo')
예제 #6
0
    def test_calls_to_git(self, mock_git, mock_tempfile):
        instance = GitVCS('git+/foo/bar')
        instance.clone()

        mock_git.bake.assert_called_with(_cwd='/tmp/foo')