Skip to content

Commit 04b08a3

Browse files
committed
style: Fix linting issues
1 parent 3bb88ad commit 04b08a3

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

tools/cloudharness-test/cloudharness_test/apitest_init.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
st.experimental.OPEN_API_3_1.enable()
88

99

10-
import os
11-
import logging
12-
import schemathesis as st
13-
1410
# Enable experimental OpenAPI 3.1 support if needed
1511
st.experimental.OPEN_API_3_1.enable()
1612

@@ -48,10 +44,9 @@
4844
if not schema:
4945
raise Exception("Cannot setup API tests: No valid schema found. Check your deployment and configuration.")
5046

51-
5247
if "USERNAME" in os.environ and "PASSWORD" in os.environ:
5348
logging.info("Setting token from username and password")
54-
49+
5550
@st.auth.register()
5651
class TokenAuth:
5752
def get(self, context):
@@ -76,7 +71,7 @@ def set(self, case, data, context):
7671
case.headers = case.headers or {}
7772
case.headers["Authorization"] = f"Bearer {data}"
7873
case.headers["Cookie"] = f"kc-access={data}"
79-
74+
8075
UNSAFE_VALUES = ("%")
8176

8277
@st.hook
@@ -96,4 +91,4 @@ def valid_param(x):
9691

9792
return True
9893

99-
return strategy.filter(valid_param)
94+
return strategy.filter(valid_param)

0 commit comments

Comments
 (0)