diff options
Diffstat (limited to 'tests/util.py')
-rw-r--r-- | tests/util.py | 14 |
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 |