Ejemplo n.º 1
0
 def test_mark_as_retry(self):
     tb = DatabaseBackend()
     tid = uuid()
     try:
         raise KeyError('foo')
     except KeyError, exception:
         import traceback
         trace = '\n'.join(traceback.format_stack())
         tb.mark_as_retry(tid, exception, traceback=trace)
Ejemplo n.º 2
0
 def test_mark_as_retry(self):
     tb = DatabaseBackend()
     tid = uuid()
     try:
         raise KeyError("foo")
     except KeyError, exception:
         import traceback
         trace = "\n".join(traceback.format_stack())
         tb.mark_as_retry(tid, exception, traceback=trace)
Ejemplo n.º 3
0
 def test_mark_as_retry(self):
     tb = DatabaseBackend(self.uri, app=self.app)
     tid = uuid()
     try:
         raise KeyError('foo')
     except KeyError as exception:
         import traceback
         trace = '\n'.join(traceback.format_stack())
         tb.mark_as_retry(tid, exception, traceback=trace)
         assert tb.get_state(tid) == states.RETRY
         assert isinstance(tb.get_result(tid), KeyError)
         assert tb.get_traceback(tid) == trace
Ejemplo n.º 4
0
 def test_mark_as_retry(self):
     tb = DatabaseBackend(self.uri, app=self.app)
     tid = uuid()
     try:
         raise KeyError('foo')
     except KeyError as exception:
         import traceback
         trace = '\n'.join(traceback.format_stack())
         tb.mark_as_retry(tid, exception, traceback=trace)
         assert tb.get_state(tid) == states.RETRY
         assert isinstance(tb.get_result(tid), KeyError)
         assert tb.get_traceback(tid) == trace
Ejemplo n.º 5
0
 def test_mark_as_retry(self):
     tb = DatabaseBackend()
     tid = uuid()
     try:
         raise KeyError('foo')
     except KeyError as exception:
         import traceback
         trace = '\n'.join(traceback.format_stack())
         tb.mark_as_retry(tid, exception, traceback=trace)
         self.assertEqual(tb.get_status(tid), states.RETRY)
         self.assertIsInstance(tb.get_result(tid), KeyError)
         self.assertEqual(tb.get_traceback(tid), trace)