Skip to content

Commit 8fae848

Browse files
committed
changed API_USER and USER_PWD to accept None
1 parent 0a36f3e commit 8fae848

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mergin/test/test_client.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def create_project_path(name, mc):
8888

8989

9090
def create_mc_client_and_workspace(api_user, user_pwd, test_tag=""):
91-
if api_user != "" and user_pwd != "": # if API_USER and USER_PWD is provided we log in user and use him for tests
91+
if api_user and user_pwd : # if API_USER and USER_PWD is provided we log in user and use him for tests
9292
user = api_user
9393
password = user_pwd
9494

@@ -120,11 +120,12 @@ def create_mc_client_and_workspace(api_user, user_pwd, test_tag=""):
120120
def mc():
121121
assert SERVER_URL and SERVER_URL.rstrip("/") != "https://app.merginmaps.com"
122122

123+
123124
client = create_mc_client_and_workspace(API_USER, USER_PWD)
124125

125126
yield client
126127

127-
if API_USER == "" or USER_PWD == "":
128+
if not (API_USER and USER_PWD):
128129
delete_test_user_and_workspace(client)
129130

130131

@@ -136,7 +137,7 @@ def mc2():
136137

137138
yield client
138139

139-
if API_USER2 == "" or USER_PWD2 == "":
140+
if not (API_USER2 and USER_PWD2):
140141
delete_test_user_and_workspace(client)
141142

142143

0 commit comments

Comments
 (0)