summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2014-10-01 09:03:45 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2014-10-01 10:22:17 -0700
commit70385ed28eb0185b4555f584762ecbcc0bba50c1 (patch)
tree7ff141a7b4fc12553857a9b8fbca33deee5d28e6
parent94b063a82a837296232998174ce9ba598b32e950 (diff)
downloadtaskflow-70385ed28eb0185b4555f584762ecbcc0bba50c1.tar.gz
Make it so that the import works for older versions of kombu
The import location for message was different in older versions of kombu, so when using it for mocking we need to take into account the older location so that the test correctly works out as it should (without import errors). Fixes bug 1376330 Change-Id: Ifad489f0e15490168f993f48bfedfd553acd4a69
-rw-r--r--taskflow/tests/unit/worker_based/test_dispatcher.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/taskflow/tests/unit/worker_based/test_dispatcher.py b/taskflow/tests/unit/worker_based/test_dispatcher.py
index a7bf2d5..db0a719 100644
--- a/taskflow/tests/unit/worker_based/test_dispatcher.py
+++ b/taskflow/tests/unit/worker_based/test_dispatcher.py
@@ -14,7 +14,10 @@
# License for the specific language governing permissions and limitations
# under the License.
-from kombu import message
+try:
+ from kombu import message # noqa
+except ImportError:
+ from kombu.transport import base as message
from taskflow.engines.worker_based import dispatcher
from taskflow import test