Skip to content

Commit

Permalink
fixed the minor issue with url validator
Browse files Browse the repository at this point in the history
  • Loading branch information
engshahrad committed Jan 29, 2024
1 parent 4132171 commit ad43017
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion synthetic_workload_invoker/WorkloadInvoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def HTTPInstanceGeneratorGeneric(instance_times, blocking_cli, url, data):
"""
if len(instance_times) == 0:
return False
if validators.url(url) is False:
if validators.url(url) is not True:
logger.error("Invalid URL: " + url)
return False

Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/WorkloadInvoker_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_HTTPInstanceGeneratorGenerics(self):
status = HTTPInstanceGeneratorGeneric(
instance_times=[1.0, 1.0, 1.0, 1.0],
blocking_cli=0,
url="http://localhost:8080",
url="http://127.0.0.1:8080",
data="",
)
self.assertTrue(status)
Expand All @@ -21,7 +21,7 @@ def test_HTTPInstanceGeneratorGenerics_with_empty_instance_times(self):
status = HTTPInstanceGeneratorGeneric(
instance_times=[],
blocking_cli=0,
url="http://localhost:8080",
url="http://127.0.0.1:8080",
data="",
)
self.assertFalse(status)
Expand Down

0 comments on commit ad43017

Please sign in to comment.