summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2015-03-28 23:43:17 +0100
committerThomas Bruederli <bruederli@kolabsys.com>2015-03-28 23:43:17 +0100
commitfff814d60954eacc42403e3799c030660c1ba4da (patch)
treed67d997238c9be4ae8e5ba8bfe4b8db7c013ea54 /tests
parent821e6de04a968f98363503f83705bf350a41a3bd (diff)
downloadpykolab-fff814d60954eacc42403e3799c030660c1ba4da.tar.gz
Improve proplist ordering routine
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/test-017-diff.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/test-017-diff.py b/tests/unit/test-017-diff.py
index 6c0a585..4b0c72c 100644
--- a/tests/unit/test-017-diff.py
+++ b/tests/unit/test-017-diff.py
@@ -170,6 +170,14 @@ class TestComputeDiff(unittest.TestCase):
self.assertEqual(aa[0], bb[0])
self.assertEqual(aa[1], bb[1])
+ def test_000_order_proplists2(self):
+ a1 = {'code': '4567', 'locality': 'Worktown', 'country': 'Switzerland', 'region': '', 'label': '', 'street': 'Workstreet 22', 'type': 'work'}
+ a2 = {'code': '55550', 'locality': 'San Francisco', 'country': 'USA', 'region': 'CA', 'label': '', 'street': 'O-steet', 'type': 'office'}
+ a3 = {'code': '6666', 'locality': 'Workcity', 'country': 'Switzerland', 'region': 'ZH', 'label': '', 'street': 'Workstreet 22', 'type': 'work'}
+ a4 = dict(a2)
+
+ (aa, bb) = order_proplists([a1, a2], [a3, a4])
+ self.assertEqual(aa[1], bb[1])
def test_001_attachments(self):
old = Todo(from_string=xml_todo_01)