Show More
@@ -16,6 +16,8 b' Authors:' | |||
|
16 | 16 | # Imports |
|
17 | 17 | #------------------------------------------------------------------------------- |
|
18 | 18 | |
|
19 | import os | |
|
20 | ||
|
19 | 21 | from unittest import TestCase |
|
20 | 22 | |
|
21 | 23 | from nose import SkipTest |
@@ -25,8 +27,14 b' from IPython.parallel.controller.mongodb import MongoDB' | |||
|
25 | 27 | |
|
26 | 28 | from . import test_db |
|
27 | 29 | |
|
30 | conn_kwargs = {} | |
|
31 | if 'DB_IP' in os.environ: | |
|
32 | conn_kwargs['host'] = os.environ['DB_IP'] | |
|
33 | if 'DB_PORT' in os.environ: | |
|
34 | conn_kwargs['port'] = int(os.environ['DB_PORT']) | |
|
35 | ||
|
28 | 36 | try: |
|
29 | c = Connection() | |
|
37 | c = Connection(**conn_kwargs) | |
|
30 | 38 | except Exception: |
|
31 | 39 | c=None |
|
32 | 40 |
General Comments 0
You need to be logged in to leave comments.
Login now