summaryrefslogtreecommitdiff
path: root/taskflow/tests
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2015-07-06 15:31:29 -0700
committerJoshua Harlow <jxharlow@godaddy.com>2016-05-10 15:26:57 -0700
commitafbfe77a7f7bad87c3e95b4f0c94cab84258a5bb (patch)
tree2f27418e05a99cbfd2bad76977152d07067d37f8 /taskflow/tests
parent3321b22ca81bd0e1d8923abc62db014d07fed9ce (diff)
downloadtaskflow-afbfe77a7f7bad87c3e95b4f0c94cab84258a5bb.tar.gz
Remove deprecated things for 2.0 release
Change-Id: Id9adbc50bd51adc77ce88f698ad0ea2ee63fc5e2
Diffstat (limited to 'taskflow/tests')
-rw-r--r--taskflow/tests/unit/persistence/test_dir_persistence.py4
-rw-r--r--taskflow/tests/unit/persistence/test_memory_persistence.py39
-rw-r--r--taskflow/tests/unit/test_retries.py4
3 files changed, 18 insertions, 29 deletions
diff --git a/taskflow/tests/unit/persistence/test_dir_persistence.py b/taskflow/tests/unit/persistence/test_dir_persistence.py
index 7445145..39ca787 100644
--- a/taskflow/tests/unit/persistence/test_dir_persistence.py
+++ b/taskflow/tests/unit/persistence/test_dir_persistence.py
@@ -25,7 +25,7 @@ import testscenarios
from taskflow import exceptions as exc
from taskflow.persistence import backends
from taskflow.persistence.backends import impl_dir
-from taskflow.persistence import logbook
+from taskflow.persistence import models
from taskflow import test
from taskflow.tests.unit.persistence import base
@@ -81,7 +81,7 @@ class DirPersistenceTest(testscenarios.TestWithScenarios,
for i in range(0, int(1.5 * self.max_cache_size)):
lb_name = 'book-%s' % (i)
lb_id = uuidutils.generate_uuid()
- lb = logbook.LogBook(name=lb_name, uuid=lb_id)
+ lb = models.LogBook(name=lb_name, uuid=lb_id)
self.assertRaises(exc.NotFound, conn.get_logbook, lb_id)
conn.save_logbook(lb)
books_ids_made.append(lb_id)
diff --git a/taskflow/tests/unit/persistence/test_memory_persistence.py b/taskflow/tests/unit/persistence/test_memory_persistence.py
index 68b9ac3..4616b08 100644
--- a/taskflow/tests/unit/persistence/test_memory_persistence.py
+++ b/taskflow/tests/unit/persistence/test_memory_persistence.py
@@ -71,26 +71,6 @@ class MemoryFilesystemTest(test.TestCase):
self.assertEqual('c', fs['/c'])
self.assertEqual('db', fs['/d/b'])
- def test_old_ls_recursive(self):
- fs = impl_memory.FakeFilesystem()
- fs.ensure_path("/d")
- fs.ensure_path("/c/d")
- fs.ensure_path("/b/c/d")
- fs.ensure_path("/a/b/c/d")
- contents = fs.ls("/", recursive=True)
- self.assertEqual([
- '/a',
- '/b',
- '/c',
- '/d',
- '/a/b',
- '/b/c',
- '/c/d',
- '/a/b/c',
- '/b/c/d',
- '/a/b/c/d',
- ], contents)
-
def test_ls_recursive(self):
fs = impl_memory.FakeFilesystem()
fs.ensure_path("/d")
@@ -140,22 +120,31 @@ class MemoryFilesystemTest(test.TestCase):
contents = fs.ls_r("/a/b", absolute=False)
self.assertEqual(['c', 'c/d'], contents)
- def test_ls_recursive_targeted_absolute(self):
+ def test_ls_targeted(self):
fs = impl_memory.FakeFilesystem()
fs.ensure_path("/d")
fs.ensure_path("/c/d")
fs.ensure_path("/b/c/d")
fs.ensure_path("/a/b/c/d")
- contents = fs.ls_r("/a/b", absolute=True)
- self.assertEqual(['/a/b/c', '/a/b/c/d'], contents)
+ contents = fs.ls("/a/b", absolute=False)
+ self.assertEqual(['c'], contents)
+
+ def test_ls_targeted_absolute(self):
+ fs = impl_memory.FakeFilesystem()
+ fs.ensure_path("/d")
+ fs.ensure_path("/c/d")
+ fs.ensure_path("/b/c/d")
+ fs.ensure_path("/a/b/c/d")
+ contents = fs.ls("/a/b", absolute=True)
+ self.assertEqual(['/a/b/c'], contents)
- def test_old_ls_recursive_targeted_absolute(self):
+ def test_ls_recursive_targeted_absolute(self):
fs = impl_memory.FakeFilesystem()
fs.ensure_path("/d")
fs.ensure_path("/c/d")
fs.ensure_path("/b/c/d")
fs.ensure_path("/a/b/c/d")
- contents = fs.ls("/a/b", recursive=True)
+ contents = fs.ls_r("/a/b", absolute=True)
self.assertEqual(['/a/b/c', '/a/b/c/d'], contents)
def test_ensure_path(self):
diff --git a/taskflow/tests/unit/test_retries.py b/taskflow/tests/unit/test_retries.py
index 3d1cbb6..8532997 100644
--- a/taskflow/tests/unit/test_retries.py
+++ b/taskflow/tests/unit/test_retries.py
@@ -1201,7 +1201,7 @@ class RetryParallelExecutionTest(utils.EngineTestBase):
utils.ConditionalTask('task2')
)
engine = self._make_engine(flow)
- engine.task_notifier.register('*', waiting_task.callback)
+ engine.atom_notifier.register('*', waiting_task.callback)
engine.storage.inject({'y': 2})
with utils.CaptureListener(engine, capture_flow=False) as capturer:
engine.run()
@@ -1237,7 +1237,7 @@ class RetryParallelExecutionTest(utils.EngineTestBase):
utils.ConditionalTask('task3'))
)
engine = self._make_engine(flow)
- engine.task_notifier.register('*', waiting_task.callback)
+ engine.atom_notifier.register('*', waiting_task.callback)
engine.storage.inject({'y': 2})
with utils.CaptureListener(engine, capture_flow=False) as capturer:
engine.run()