Skip to content

Commit 2feb28b

Browse files
committed
fix Tiled API key handling for utils/test_extra_client
1 parent 9b6ba0e commit 2feb28b

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

test_extra_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
@task
6-
def get_other_docs(uid):
6+
def get_other_docs(uid, api_key=api_key):
77
logger = get_run_logger()
88
result = get_tiled_client()["raw"][uid]
99
for name, doc in result.documents():

utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
from dotenv import load_dotenv
21
from tiled.client import from_profile
32

43
import os
54

65
LOCATION = "tst"
76

87

9-
def get_tiled_client():
10-
with open("/srv/tiled.secret", "r") as secrets:
11-
load_dotenv(stream=secrets)
12-
api_key = os.environ["TILED_API_KEY"]
8+
def get_tiled_client(api_key=None):
139
tiled_client = from_profile("nsls2", api_key=api_key)[LOCATION]
1410
return tiled_client

0 commit comments

Comments
 (0)