summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-09-13 11:53:38 +0100
committerWill Thompson <will.thompson@collabora.co.uk>2011-09-13 12:33:36 +0100
commitcb19851532bb95ef18e162fc055dbed8c4d579d9 (patch)
tree78fd9147731a71d6c5823b0d940ff54113c588d7 /tests
parentd9a6c491c2973b3e248de76615e83779ea820586 (diff)
servicetest: Implement Event.__str__
This is stolen from Gabble.
Diffstat (limited to 'tests')
-rw-r--r--tests/twisted/servicetest.py3
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]