コード例 #1
0
ファイル: test_template.py プロジェクト: jackqu7/Facio
    def test_copy_oserror_vcs_path(
            self,
            mock_copy_tree,
            mock_isdir,
            mock_gitvcs,
            mock_exit):

        instance = Template('git+/foo/bar')
        instance.COPY_ATTEMPT_LIMIT = 0  # Block the next copy call

        with self.assertRaises(FacioException):
            instance.copy()
        mock_gitvcs.assert_called_with('git+/foo/bar')
コード例 #2
0
ファイル: test_template.py プロジェクト: jackqu7/Facio
    def test_copy_oserror_vcs_clone_returns_not_path(
            self,
            mock_copy_tree,
            mock_isdir,
            mock_gitvcs,
            mock_exit):

        instance = Template('git+/foo/bar')
        instance.COPY_ATTEMPT_LIMIT = 0  # Block the next copy call

        with self.assertRaises(FacioException):
            instance.copy()
        self.mocked_facio_exceptions_puts.assert_any_call(
            'Error: New path to template not returned by GitVCS.clone()')