def setUp(self): # Grab the FakeMessageSource and hold a reference to it so its # in-memory attributes stick around long enough for us to make some # assertions about them. result = StubbedTest.setUp(self) self.messageSource = self.store.findUnique(FakeMessageSource) return result
def tearDown(self): d = StubbedTest.tearDown(self) def flushit(ign): from epsilon.cooperator import SchedulerStopped self.flushLoggedErrors(SchedulerStopped) return ign return d.addCallback(flushit)
def setUp(self): d = StubbedTest.setUp(self) def cbSetUp(ignored): self.hook = self.store.findUnique(_SubSchedulerParentHook) d.addCallback(cbSetUp) return d
def setUp(self): D = StubbedTest.setUp(self) def setUpFinished(): self.inbox = self.store.findUnique(Inbox) D.addCallback(lambda _: setUpFinished()) return D
def setUp(self): """ Skip the tests if PIL is unavailable. """ try: import PIL except ImportError: raise SkipTest('PIL is not available') return StubbedTest.setUp(self)
def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # think of another way to do it. self.dummyRun = DummyProcessor.run.im_func self.calledBack = Deferred() def dummyRun(calledOn): self.calledBack.callback(calledOn) DummyProcessor.run = dummyRun return StubbedTest.setUp(self)
def setUp(self): d = StubbedTest.setUp(self) def siteStoreUpgraded(ignored): loginSystem = self.store.findUnique(LoginSystem) account = loginSystem.accountByAddress(USERNAME, DOMAIN) self.subStore = account.avatars.open() return self.subStore.whenFullyUpgraded() d.addCallback(siteStoreUpgraded) return d
def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # think of another way to do it. self.dummyRun = DummyProcessor.run.__func__ self.calledBack = Deferred() def dummyRun(calledOn): self.calledBack.callback(calledOn) DummyProcessor.run = dummyRun return StubbedTest.setUp(self)
def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # think of another way to do it. self.dummyRun = DummyProcessor.run.im_func self.dummyRunCalls = [] def dummyRun(calledOn): self.dummyRunCalls.append(calledOn) DummyProcessor.run = dummyRun return StubbedTest.setUp(self)
def tearDown(self): """ This test suite is unfortunately awful and buggy and implicitly starts upgraders in substores and does not wait for them to complete. When correct error logging was added to the upgrade process, they all broke. However, the errors logged here are mostly harmless so they are being quashed for the time being. """ # -glyph d = StubbedTest.tearDown(self) def flushit(ign): from epsilon.cooperator import SchedulerStopped self.flushLoggedErrors(SchedulerStopped) return ign return d.addCallback(flushit)
def setUp(self): stub_undefertask1to2.SCHEDULE_LOG = [] return StubbedTest.setUp(self)
def tearDown(self): # Okay this is a pretty irrelevant method on a pretty irrelevant class, # but we'll fix it anyway. DummyProcessor.run = self.dummyRun return StubbedTest.tearDown(self)