summaryrefslogtreecommitdiff
path: root/tests/test_GitModifier.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_GitModifier.py')
-rw-r--r--tests/test_GitModifier.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_GitModifier.py b/tests/test_GitModifier.py
new file mode 100644
index 00000000..10188a0e
--- /dev/null
+++ b/tests/test_GitModifier.py
@@ -0,0 +1,23 @@
+# vim: set fileencoding=utf-8 :
+
+"""
+Test L{gbp.git.GitModifier}
+"""
+
+def test_author():
+ """
+ Methods tested:
+ - L{gbp.git.GitModifer.get_author_env}
+ - L{gbp.git.GitModifer.get_comitter_env}
+
+ >>> import gbp.git
+ >>> modifier = gbp.git.GitModifier("foo", "bar")
+ >>> modifier.name
+ 'foo'
+ >>> modifier.email
+ 'bar'
+ >>> modifier.get_author_env()
+ {'GIT_AUTHOR_EMAIL': 'bar', 'GIT_AUTHOR_NAME': 'foo'}
+ >>> modifier.get_committer_env()
+ {'GIT_COMMITTER_NAME': 'foo', 'GIT_COMMITTER_EMAIL': 'bar'}
+ """