Skip to content

Commit e31177f

Browse files
jhart1685molepigeon
authored andcommitted
fix(Tests): Remove reliance on Python 3.9 inbuilt method
Signed-off-by: James Hart <[email protected]>
1 parent fbcb0ec commit e31177f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

test/integration/test_container_registry_v1.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ def setup_class(cls):
4747
)
4848
assert cls.container_registry_service is not None
4949

50-
cls.url = cls.config["URL"]
51-
assert cls.url is not None
52-
cls.dns_name = cls.url.removeprefix("https://")
50+
cls.dns_name = cls.config["URL"]
51+
assert cls.dns_name is not None
52+
if cls.dns_name.startswith("https://"):
53+
cls.dns_name = cls.dns_name[len("https://"):]
5354

5455
print('Setup complete.')
5556

test/integration/test_vulnerability_advisor_v3.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ def setup_class(cls):
4747
)
4848
assert cls.vulnerability_advisor_service is not None
4949

50-
cls.url = cls.config["URL"]
51-
assert cls.url is not None
52-
cls.dns_name = cls.url.removeprefix("https://")
50+
cls.dns_name = cls.config["URL"]
51+
assert cls.dns_name is not None
52+
if cls.dns_name.startswith("https://"):
53+
cls.dns_name = cls.dns_name[len("https://"):]
5354

5455
print('Setup complete.')
5556

0 commit comments

Comments
 (0)