示例#1
0
 def test_fetch_rev_revparse(self, mock_call):
     """Verify the commands to fetch from a Git repository w/ rev-parse."""
     git.fetch('mock.git', 'master@{2015-02-12 18:30:00}')
     assert_calls(mock_call, [
         "git remote set-url origin mock.git",
         "git fetch --tags --force --prune origin",
     ])
示例#2
0
 def test_fetch_rev_sha(self, mock_call):
     """Verify the commands to fetch from a Git repository w/ SHA."""
     git.fetch('mock.git', 'abcdef1234' * 4)
     assert_calls(mock_call, [
         "git remote set-url origin mock.git",
         "git fetch --tags --force --prune origin",
     ])
示例#3
0
 def test_fetch_rev(self, mock_call):
     """Verify the commands to fetch from a Git repository w/ rev."""
     git.fetch('mock.git', 'mock-rev')
     assert_calls(mock_call, [
         "git remote set-url origin mock.git",
         "git fetch --tags --force --prune origin mock-rev",
     ])
示例#4
0
 def test_fetch_rev_revparse(self, mock_call):
     """Verify the commands to fetch from a Git repository w/ rev-parse."""
     git.fetch('mock.git', 'master@{2015-02-12 18:30:00}')
     check_calls(mock_call, [
         "git remote set-url origin mock.git",
         "git fetch --tags --force --prune origin",
     ])
示例#5
0
 def test_fetch_rev_sha(self, mock_call):
     """Verify the commands to fetch from a Git repository w/ SHA."""
     git.fetch('mock.git', 'abcdef1234' * 4)
     check_calls(mock_call, [
         "git remote set-url origin mock.git",
         "git fetch --tags --force --prune origin",
     ])
示例#6
0
 def test_fetch_rev(self, mock_call):
     """Verify the commands to fetch from a Git repository w/ rev."""
     git.fetch('mock.git', 'mock-rev')
     check_calls(mock_call, [
         "git remote set-url origin mock.git",
         "git fetch --tags --force --prune origin mock-rev",
     ])
示例#7
0
文件: test_git.py 项目: wildi1/gitman
 def test_fetch(self, mock_call):
     """Verify the commands to fetch from a Git repository."""
     git.fetch('git', 'mock.git', 'mock/path')
     check_calls(
         mock_call,
         [
             "git remote set-url origin mock.git",
             "git fetch --tags --force --prune origin",
         ],
     )