aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-09-05 09:53:57 +0300
committerGuido Günther <agx@sigxcpu.org>2013-09-10 09:19:26 +0200
commit3eb401db658a5143e06f2d29a292e9be5b8a623a (patch)
tree7af6db9130c9099809af29c518af82ba26b636a6 /tests
parentdb79c5db34498bc353f7d1e10bb1f4b7140d876b (diff)
git: new class and method for remote repositories
Add a new GitRemote class for representing git remote repositories. The initial, very limited, version only contains information about the fetch and push URLs of the remote repository. Also, add a new GitRepository.get_remotes() method for getting remote repositories as instances of the new GitRemote class. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_GitRepository.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py
index f48db0a9..427370da 100644
--- a/tests/test_GitRepository.py
+++ b/tests/test_GitRepository.py
@@ -568,6 +568,28 @@ def test_clone():
False
"""
+def test_get_remotes():
+ """
+ Merge a branch
+
+ Methods tested:
+ - L{gbp.git.GitRepository.get_remotes}
+
+ >>> import os
+ >>> import gbp.git.repository
+ >>> repo = gbp.git.repository.GitRepository(os.path.join(clone_dir, 'repo'))
+ >>> remotes = repo.get_remotes()
+ >>> len(remotes)
+ 1
+ >>> origin = remotes['origin']
+ >>> origin.name
+ 'origin'
+ >>> origin.fetch_url == repo_dir
+ True
+ >>> origin.push_urls == [repo_dir]
+ True
+ """
+
def test_merge():
"""
Merge a branch