Skip to content

Commit 474623a

Browse files
authored
Merge pull request #8 from corywright/tests-without-apicreds
Set all credentials to None if no apicreds.py file present
2 parents d10a943 + 3d81165 commit 474623a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tests/test_iland_int.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@
2222
USERNAME,
2323
PASSWORD)
2424
except ImportError:
25-
from .apicreds import (CLIENT_ID,
26-
CLIENT_SECRET,
27-
USERNAME,
28-
PASSWORD)
25+
try:
26+
from .apicreds import (CLIENT_ID,
27+
CLIENT_SECRET,
28+
USERNAME,
29+
PASSWORD)
30+
except ImportError:
31+
CLIENT_ID = None
32+
CLIENT_SECRET = None
33+
USERNAME = None
34+
PASSWORD = None
2935

3036
VDC_UUID = \
3137
'res01.ilandcloud.com:urn:vcloud:vdc:a066325d-6be0-4733-8d9f-7687c36f4536'

0 commit comments

Comments
 (0)