Skip to content

Commit 466f06d

Browse files
author
brentru
committed
modified base to take in envar
1 parent 2f58c68 commit 466f06d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
SECRET_IO_USER: ${{ secrets.CI_IO_USERNAME }}
2525
run: |
2626
cd tests/
27-
python -m unittest discover
27+
ADAFRUIT_IO_KEY="$SECRET_IO_KEY" ADAFRUIT_IO_USERNAME="$SECRET_IO_USER" python unittest discover

tests/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def get_test_key(self):
2828
"""Return the AIO key specified in the ADAFRUIT_IO_KEY environment
2929
variable, or raise an exception if it doesn't exist.
3030
"""
31-
key = os.environ[SECRET_IO_KEY]
31+
key = os.environ.get('ADAFRUIT_IO_KEY', None)
3232
if key is None:
3333
raise RuntimeError("ADAFRUIT_IO_KEY environment variable must be " \
3434
"set with valid Adafruit IO key to run this test!")
@@ -38,7 +38,7 @@ def get_test_username(self):
3838
"""Return the AIO username specified in the ADAFRUIT_IO_USERNAME
3939
environment variable, or raise an exception if it doesn't exist.
4040
"""
41-
username = os.environ[SECRET_IO_USER]
41+
username = os.environ.get('ADAFRUIT_IO_USERNAME', None)
4242
if username is None:
4343
raise RuntimeError("ADAFRUIT_IO_USERNAME environment variable must be " \
4444
"set with valid Adafruit IO username to run this test!")

0 commit comments

Comments
 (0)