diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-13 11:53:38 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-13 12:33:36 +0100 |
commit | cb19851532bb95ef18e162fc055dbed8c4d579d9 (patch) | |
tree | 78fd9147731a71d6c5823b0d940ff54113c588d7 /tests | |
parent | d9a6c491c2973b3e248de76615e83779ea820586 (diff) |
servicetest: Implement Event.__str__
This is stolen from Gabble.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/twisted/servicetest.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/twisted/servicetest.py b/tests/twisted/servicetest.py index 0d001709..4ceaf64c 100644 --- a/tests/twisted/servicetest.py +++ b/tests/twisted/servicetest.py @@ -42,6 +42,9 @@ class Event: self.__dict__.update(kw) self.type = type + def __str__(self): + return '\n'.join([ str(type(self)) ] + format_event(self)) + def format_event(event): ret = ['- type %s' % event.type] |