def test_fetch_invalid_raise(self): with self.assertRaises(TypeError): pscp.fetch(refspec=b'refs/pscp/123') with self.assertRaises(TypeError): pscp.fetch(refmap=b'refs/pscp/123') with self.assertRaises(TypeError): pscp.fetch(repository=b'origin')
def test_fetch_repo(self, run_git): pscp.fetch(repository='another repo') run_git.assert_called_once_with( 'fetch', 'another repo', 'refs/pscp/*:refs/pscp/*')
def test_fetch_refspec(self, run_git): pscp.fetch('some refspec') run_git.assert_called_once_with( 'fetch', 'origin', 'some refspec', '--refmap', 'refs/pscp/*:refs/pscp/*')
def test_fetch_refmap_refspec(self, run_git): pscp.fetch('another refspec', refmap='another refmap') run_git.assert_called_once_with( 'fetch', 'origin', 'another refspec', '--refmap', 'another refmap')
def test_fetch(self, run_git): pscp.fetch() run_git.assert_called_once_with( 'fetch', 'origin', 'refs/pscp/*:refs/pscp/*')