From cb19851532bb95ef18e162fc055dbed8c4d579d9 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Tue, 13 Sep 2011 11:53:38 +0100 Subject: servicetest: Implement Event.__str__ This is stolen from Gabble. --- tests/twisted/servicetest.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') 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] -- cgit v1.2.3