summaryrefslogtreecommitdiffstats
path: root/tests/util.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-13 01:07:33 -0700
committerJason Gerard DeRose <jderose@redhat.com>2009-01-13 01:07:33 -0700
commitc2b0d03f82f16debcc55d34ac44197e0bc97e0e8 (patch)
tree9b49474abcaad206ef47368d33dce3aa3bf50e3a /tests/util.py
parent33db9fee6017c0777f4fc5da8b020aefd714e387 (diff)
downloadfreeipa-c2b0d03f82f16debcc55d34ac44197e0bc97e0e8.tar.gz
freeipa-c2b0d03f82f16debcc55d34ac44197e0bc97e0e8.tar.xz
freeipa-c2b0d03f82f16debcc55d34ac44197e0bc97e0e8.zip
New Param: updated Bytes and Str length rules to use new rule(_, value) calling signature; updated corresponding unit tests
Diffstat (limited to 'tests/util.py')
-rw-r--r--tests/util.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/util.py b/tests/util.py
index 3033b82bd..c1480840d 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -297,12 +297,24 @@ class dummy_ugettext(object):
assert type(self.translation) is unicode
def __call__(self, message):
- assert type(message) is str
assert self.__called is False
self.__called = True
+ assert type(message) is str
+ assert not hasattr(self, 'message')
self.message = message
+ assert type(self.translation) is unicode
return self.translation
+ def called(self):
+ return self.__called
+
+ def reset(self):
+ assert type(self.translation) is unicode
+ assert type(self.message) is str
+ del self.message
+ assert self.__called is True
+ self.__called = False
+
class dummy_ungettext(object):
__called = False