From c2b0d03f82f16debcc55d34ac44197e0bc97e0e8 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Tue, 13 Jan 2009 01:07:33 -0700 Subject: New Param: updated Bytes and Str length rules to use new rule(_, value) calling signature; updated corresponding unit tests --- tests/util.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'tests/util.py') diff --git a/tests/util.py b/tests/util.py index 3033b82b..c1480840 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 -- cgit