Skip to content

Commit

Permalink
[ci] Update scripts syntax at least py3.8
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Nov 15, 2024
1 parent 3dddb7d commit f38888a
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 81 deletions.
2 changes: 1 addition & 1 deletion tests/SeleniumTests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
TEST_ADD_CAPS_RECORD_VIDEO = os.environ.get('TEST_ADD_CAPS_RECORD_VIDEO', 'true').lower() == 'true'
TEST_CUSTOM_SPECIFIC_NAME = os.environ.get('TEST_CUSTOM_SPECIFIC_NAME', 'false').lower() == 'true'

SELENIUM_GRID_URL = "%s://%s:%s" % (SELENIUM_GRID_PROTOCOL,SELENIUM_GRID_HOST,SELENIUM_GRID_PORT)
SELENIUM_GRID_URL = f"{SELENIUM_GRID_PROTOCOL}://{SELENIUM_GRID_HOST}:{SELENIUM_GRID_PORT}"
CLIENT_CONFIG = ClientConfig(
remote_server_addr=SELENIUM_GRID_URL,
keep_alive=True,
Expand Down
4 changes: 2 additions & 2 deletions tests/SmokeTests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def smoke_test_container(self, port):
while current_attempts < max_attempts:
current_attempts = current_attempts + 1
try:
grid_url_status = '%s://%s:%s/status' % (SELENIUM_GRID_PROTOCOL, SELENIUM_GRID_HOST, port)
grid_url_status = f'{SELENIUM_GRID_PROTOCOL}://{SELENIUM_GRID_HOST}:{port}/status'
if SELENIUM_GRID_USERNAME and SELENIUM_GRID_PASSWORD:
response = requests.get(grid_url_status, auth=HTTPBasicAuth(SELENIUM_GRID_USERNAME, SELENIUM_GRID_PASSWORD))
else:
Expand All @@ -55,7 +55,7 @@ def smoke_test_container(self, port):


def client_verify_cert(self, port):
grid_url_status = '%s://%s:%s/status' % (SELENIUM_GRID_PROTOCOL, SELENIUM_GRID_HOST, port)
grid_url_status = f'{SELENIUM_GRID_PROTOCOL}://{SELENIUM_GRID_HOST}:{port}/status'
cert_path = os.environ.get("REQUESTS_CA_BUNDLE")
response = requests.get(grid_url_status, verify=cert_path, auth=HTTPBasicAuth(SELENIUM_GRID_USERNAME, SELENIUM_GRID_PASSWORD))

Expand Down
2 changes: 1 addition & 1 deletion tests/build-backward-compatible/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def load_template(yaml_file):
try:
with open(yaml_file, 'r') as file:
with open(yaml_file) as file:
documents = yaml.safe_load(file)
return documents
except yaml.YAMLError as error:
Expand Down
Loading

0 comments on commit f38888a

Please sign in to comment.