commit 87c2f1eb28e64f20e095f0912264ce36117da50a Author: aagbsn aagbsn@extc.org Date: Sat Jan 26 11:14:22 2013 +0000
Update MockReporter
the created deferred should not get called until after createReport is fired --- tests/mocks.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/mocks.py b/tests/mocks.py index b692b39..c7feceb 100644 --- a/tests/mocks.py +++ b/tests/mocks.py @@ -27,12 +27,16 @@ class MockMeasurementManager(TaskManager):
class MockReporter(object): def __init__(self): - self.created = defer.succeed(None) + self.created = defer.Deferred()
- def write(self, measurement): + def writeReportEntry(self, entry): pass
def createReport(self): + self.created.callback(True) + return self.created + + def finish(self): pass
class MockFailure(Exception):