Ejemplo n.º 1
0
 def test_process_item_sets_exception_on_failure(self):
     monitor = MakePresentationReadyMonitor(self._db,
                                            [self.success, self.failure])
     monitor.process_item(self.work)
     eq_("Provider(s) failed: %s" % self.failure.SERVICE_NAME,
         self.work.presentation_ready_exception)
     eq_(False, self.work.presentation_ready)
Ejemplo n.º 2
0
    def test_process_item_sets_presentation_ready_on_success(self):
        # Create a monitor that doesn't need to do anything.
        monitor = MakePresentationReadyMonitor(self._db, [])
        monitor.process_item(self.work)

        # When it's done doing nothing, it sets the work as
        # presentation-ready.
        eq_(None, self.work.presentation_ready_exception)
        eq_(True, self.work.presentation_ready)