Skip to content

Commit 16d1290

Browse files
committed
style: Run linter
1 parent 35b4221 commit 16d1290

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

applications/samples/test/api/test_st.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@schema.include(path="/error", method="GET").parametrize()
1515
def test_api(case):
1616
response = case.call()
17-
17+
1818
if case.method == "GET":
1919
# Assert that this endpoint returns a 500 error as expected
2020
assert response.status_code == 500, f"Expected 500 error, got {response.status_code}. This api errors on purpose."

applications/volumemanager/server/volumemanager/controllers/rest_controller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def pvc_name_get(name): # noqa: E501
2727

2828
# Extract access mode safely
2929
access_mode = pvc.status.access_modes[0] if pvc.status and pvc.status.access_modes else ''
30-
30+
3131
# Extract size safely
3232
size = ''
3333
if pvc.status and pvc.status.capacity:
3434
size = pvc.status.capacity.get('storage', '')
35-
35+
3636
pvc_response = PersistentVolumeClaim(
3737
name=pvc.metadata.name,
3838
namespace=pvc.metadata.namespace,
@@ -54,7 +54,7 @@ def pvc_post(): # noqa: E501
5454
"""
5555
if connexion.request.is_json:
5656
persistent_volume_claim_create = PersistentVolumeClaimCreate.from_dict(connexion.request.get_json()) # noqa: E501
57-
57+
5858
# Validate required fields
5959
if not persistent_volume_claim_create.name or not persistent_volume_claim_create.size:
6060
return {'description': 'Name and size are required and cannot be empty.'}, 400

applications/workflows/server/workflows_api/controllers/create_and_access_controller.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def list_operations(status=None, previous_search_token=None, limit=None): # noq
6767
"""
6868
if previous_search_token == "":
6969
previous_search_token = None
70-
70+
7171
try:
7272
return workflow_service.list_operations(status, continue_token=previous_search_token, limit=limit)
7373
except BadParam as e:

tools/cloudharness-test/cloudharness_test/apitest_auth_hooks.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,31 @@ class TokenAuth:
99
"""
1010
Schemathesis authentication hook that retrieves a bearer token
1111
using Keycloak credentials and sets both Authorization header and Cookie.
12-
12+
1313
Requires USERNAME and PASSWORD environment variables to be set.
1414
"""
15-
15+
1616
def get(self, context):
1717
"""
1818
Retrieve the authentication token using username and password from environment.
19-
19+
2020
Args:
2121
context: Schemathesis hook context
22-
22+
2323
Returns:
2424
str: The bearer token
25-
25+
2626
Raises:
2727
ValueError: If USERNAME or PASSWORD environment variables are not set
2828
Exception: If token retrieval fails
2929
"""
3030
username = os.environ.get("USERNAME")
3131
password = os.environ.get("PASSWORD")
32-
32+
3333
if not username or not password:
3434
logging.warning("USERNAME and/or PASSWORD environment variables not set. Skipping authentication.")
3535
return None
36-
36+
3737
try:
3838
token = get_token(username, password)
3939
if not token:
@@ -44,20 +44,19 @@ def get(self, context):
4444
except Exception as e:
4545
logging.error("Failed to retrieve bearer token for user %s: %s", username, e)
4646
raise
47-
47+
4848
def set(self, case, data, context):
4949
"""
5050
Set the authentication token in the request headers and cookies.
51-
51+
5252
Args:
5353
case: Schemathesis test case
5454
data: The authentication token
5555
context: Schemathesis hook context
5656
"""
5757
if not data:
5858
return
59-
59+
6060
case.headers = case.headers or {}
6161
case.headers["Authorization"] = f"Bearer {data}"
6262
case.headers["Cookie"] = f"kc-access={data}"
63-

0 commit comments

Comments
 (0)