Skip to content

Commit

Permalink
test: Skip mongoengine if connection can not be made
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcrow committed May 30, 2018
1 parent 9b37084 commit 87ec361
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_storage_mongo.py
Expand Up @@ -53,7 +53,11 @@
try:
import mongoengine
HAS_MONGOENGINE = True
mongoengine.connect(db="mongoenginetest")
try:
mongoengine.connect(db="mongoenginetest")
except:
print('Can not connect to mongoengine database.')
HAS_MONGOENGINE = False
except ImportError:
pass

Expand Down

0 comments on commit 87ec361

Please sign in to comment.