summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-07-29 21:31:08 +0200
committerGuido Günther <agx@sigxcpu.org>2012-07-29 21:31:08 +0200
commitc4524f830d2de61a7107b0fb140718d985970412 (patch)
tree94debeead19c1dc6681b9bc5cbd23241c18c1fd2
parent7a9f947d791a7ef891593ae6eef8356ec5fb0ed5 (diff)
GitModifier: add tests for dict interface
-rw-r--r--tests/test_GitModifier.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/test_GitModifier.py b/tests/test_GitModifier.py
index 25c6531a..3277d82d 100644
--- a/tests/test_GitModifier.py
+++ b/tests/test_GitModifier.py
@@ -25,8 +25,6 @@ def test_author():
Traceback (most recent call last):
...
GitModifierError: Neither comitter nor author
- >>> modifier.keys()
- ['name', 'email', 'date']
>>> modifier['name']
'foo'
>>> modifier['email']
@@ -64,3 +62,15 @@ def test_date():
>>> modifier.tz_offset
'+0000'
"""
+
+def test_dict():
+ """
+ Test C{dict} interface
+ >>> import gbp.git
+ >>> modifier = gbp.git.GitModifier('foo', 'bar', 1)
+ >>> sorted(modifier.keys())
+ ['date', 'email', 'name']
+ >>> sorted(modifier.items())
+ [('date', '1 +0000'), ('email', 'bar'), ('name', 'foo')]
+ """
+