summaryrefslogtreecommitdiffstats
path: root/tests/util.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2012-03-12 05:58:44 -0400
committerRob Crittenden <rcritten@redhat.com>2012-04-03 16:19:59 -0400
commit2b077f7b0d68a758ae15a73eeef74591bac84360 (patch)
tree4d99ffc71065e7bc9a38bd6559f8185e1e936c81 /tests/util.py
parentb0a5524028cb692d83fafca88ed40794b5c1e86a (diff)
downloadfreeipa-2b077f7b0d68a758ae15a73eeef74591bac84360.tar.gz
freeipa-2b077f7b0d68a758ae15a73eeef74591bac84360.tar.xz
freeipa-2b077f7b0d68a758ae15a73eeef74591bac84360.zip
Test the batch plugin
This adds tests for the batch plugin, and changes its output declaration to allow results as tuples (this tripped validation). The assert_deepequal function ignores the order of items in lists. Document this in its docstring, and use a custom checker for the batch plugin results.
Diffstat (limited to 'tests/util.py')
-rw-r--r--tests/util.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/util.py b/tests/util.py
index 9bce7c08c..7929321a1 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -287,6 +287,9 @@ def assert_deepequal(expected, got, doc='', stack=tuple()):
expected = u'how are you?'
got = 'how are you?'
path = (0, 'world')
+
+ Note that lists and tuples are considered equivalent, and the order of
+ their elements does not matter.
"""
if isinstance(expected, tuple):
expected = list(expected)