summaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-07-20 12:52:29 -0400
committerKali Kaneko <kali@leap.se>2017-07-20 15:13:35 -0400
commit8febd7da7746fbaa8a78042d893ffe09eb41ba0a (patch)
tree016df044c4dea4e59496a1b37984656d3683e550 /tests/functional
parent7a8fd9a2b26830b0c22c2fe9505151cf7d0f1018 (diff)
[tests] clearer message if test user not defined
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/features/environment.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/functional/features/environment.py b/tests/functional/features/environment.py
index cc3179e..b88ddd7 100644
--- a/tests/functional/features/environment.py
+++ b/tests/functional/features/environment.py
@@ -22,9 +22,13 @@ def before_all(context):
context.host = 'https://{}'.format(context.host)
context.hostname = urlparse(context.host).hostname
- context.username = os.environ['TEST_USERNAME']
- context.password = os.environ['TEST_PASSWORD']
- context.user_email = '{}@{}'.format(context.username, context.hostname)
+ try:
+ context.username = os.environ['TEST_USERNAME']
+ context.password = os.environ['TEST_PASSWORD']
+ context.user_email = '{}@{}'.format(context.username, context.hostname)
+ except KeyError:
+ print('TEST_USERNAME or TEST_PASSWORD not set')
+ sys.exit(0)
def _setup_webdriver(context):