Commit 04e1e435 authored by payno's avatar payno
Browse files

skip TestWorkflows if pymongo not installed

parent 43a5a48a
...@@ -26,16 +26,22 @@ __date__ = "28/05/2019" ...@@ -26,16 +26,22 @@ __date__ = "28/05/2019"
import os import os
import logging import logging
import unittest import unittest
from pypushflow.test.TestWorkflow import Workflow1 from pypushflow.test.TestWorkflow import Workflow1
from pypushflow.test.TestWorkflow import Workflow2 from pypushflow.test.TestWorkflow import Workflow2
from pypushflow.test.TestWorkflow import Workflow3 from pypushflow.test.TestWorkflow import Workflow3
try:
import pymongo
except ImportError:
_has_pymongo = False
else:
_has_pymongo = True
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger('testWorkflow') logger = logging.getLogger('testWorkflow')
@unittest.skipUnless(_has_pymongo, 'need pymongo install')
class TestWorkflows(unittest.TestCase): class TestWorkflows(unittest.TestCase):
def setUp(self): def setUp(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment