summaryrefslogtreecommitdiff
path: root/taskflow/tests/unit/persistence/base.py
diff options
context:
space:
mode:
authorJeremy Stanley <fungi@yuggoth.org>2014-03-31 12:51:17 +0000
committerJeremy Stanley <fungi@yuggoth.org>2014-03-31 12:59:31 +0000
commitc95bf4165d41241fdbbfefe62653450eb7e5e838 (patch)
treeb949126192d60a7ddb43e3d2db1779947779ea27 /taskflow/tests/unit/persistence/base.py
parentc2a4989ea88000dc3a532588a96bab23c233d5fb (diff)
downloadtaskflow-c95bf4165d41241fdbbfefe62653450eb7e5e838.tar.gz
Revert "Move taskflow.utils.misc.Failure to its own module"
This reverts commit 42ca240e8157b840c298d14fbf478ae570376633 which was a breaking change in a library consumed by other OpenStack projects with no deprecation or backwards compatibility considerations. It was able to merge because openstack/taskflow is apparently not yet part of the integrated gate via the proposed I202f4809afd689155e2cc4a00fc704fd772a0e92 change. Change-Id: I96cf36dc317499df91e43502efc85221f8177395 Closes-Bug: #1300161
Diffstat (limited to 'taskflow/tests/unit/persistence/base.py')
-rw-r--r--taskflow/tests/unit/persistence/base.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/taskflow/tests/unit/persistence/base.py b/taskflow/tests/unit/persistence/base.py
index ca5a2db..3d28695 100644
--- a/taskflow/tests/unit/persistence/base.py
+++ b/taskflow/tests/unit/persistence/base.py
@@ -17,10 +17,10 @@
import contextlib
from taskflow import exceptions as exc
-from taskflow import failure
from taskflow.openstack.common import uuidutils
from taskflow.persistence import logbook
from taskflow import states
+from taskflow.utils import misc
class PersistenceTestMixin(object):
@@ -147,7 +147,7 @@ class PersistenceTestMixin(object):
try:
raise RuntimeError('Woot!')
except Exception:
- td.failure = failure.Failure()
+ td.failure = misc.Failure()
fd.add(td)
@@ -161,10 +161,10 @@ class PersistenceTestMixin(object):
lb2 = conn.get_logbook(lb_id)
fd2 = lb2.find(fd.uuid)
td2 = fd2.find(td.uuid)
- fail = td2.failure
- self.assertEqual(fail.exception_str, 'Woot!')
- self.assertIs(fail.check(RuntimeError), RuntimeError)
- self.assertEqual(fail.traceback_str, td.failure.traceback_str)
+ failure = td2.failure
+ self.assertEqual(failure.exception_str, 'Woot!')
+ self.assertIs(failure.check(RuntimeError), RuntimeError)
+ self.assertEqual(failure.traceback_str, td.failure.traceback_str)
self.assertIsInstance(td2, logbook.TaskDetail)
def test_logbook_merge_flow_detail(self):
@@ -269,7 +269,7 @@ class PersistenceTestMixin(object):
fd = logbook.FlowDetail('test', uuid=uuidutils.generate_uuid())
lb.add(fd)
rd = logbook.RetryDetail("retry-1", uuid=uuidutils.generate_uuid())
- fail = failure.Failure.from_exception(RuntimeError('fail'))
+ fail = misc.Failure.from_exception(RuntimeError('fail'))
rd.results.append((42, {'some-task': fail}))
fd.add(rd)
@@ -286,7 +286,7 @@ class PersistenceTestMixin(object):
rd2 = fd2.find(rd.uuid)
self.assertIsInstance(rd2, logbook.RetryDetail)
fail2 = rd2.results[0][1].get('some-task')
- self.assertIsInstance(fail2, failure.Failure)
+ self.assertIsInstance(fail2, misc.Failure)
self.assertTrue(fail.matches(fail2))
def test_retry_detail_save_intention(self):