コード例 #1
0
ファイル: test_vcs.py プロジェクト: jackqu7/Facio
    def test_git_not_installed_clone_exception(self, mock_sh, mock_exit):
        instance = MercurialVCS('hg+/foo/bar')

        with self.assertRaises(FacioException):
            instance.clone()
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: Mercurial must be installed to use hg+ template paths')
コード例 #2
0
    def test_git_not_installed_clone_exception(self, mock_sh, mock_exit):
        instance = MercurialVCS('hg+/foo/bar')

        with self.assertRaises(FacioException):
            instance.clone()
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: Mercurial must be installed to use hg+ template paths')
コード例 #3
0
ファイル: test_vcs.py プロジェクト: jackqu7/Facio
    def test_hg_clone_fail_exception_raised(self, mock_clone, mock_exit):
        instance = MercurialVCS('hg+/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 hg repository at /foo/bar')
コード例 #4
0
    def test_hg_clone_fail_exception_raised(self, mock_clone, mock_exit):
        instance = MercurialVCS('hg+/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 hg repository at /foo/bar')
コード例 #5
0
ファイル: test_vcs.py プロジェクト: jackqu7/Facio
    def test_calls_to_hg(self, mock_hg, mock_tempfile):
        instance = MercurialVCS('hg+/foo/bar')
        instance.clone()

        mock_hg.bake.assert_called_with(_cwd='/tmp/foo')
コード例 #6
0
    def test_calls_to_hg(self, mock_hg, mock_tempfile):
        instance = MercurialVCS('hg+/foo/bar')
        instance.clone()

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