Skip to content

Commit

Permalink
feat: testing util.is_url() method
Browse files Browse the repository at this point in the history
  • Loading branch information
simojo committed Sep 18, 2023
1 parent 65fc8c7 commit f6c11a6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ def test_fuzz_human_readable_boolean_correct_string(answer: bool) -> None:
else:
assert str_answer == "No"

# FIXME: ask for help?
@given(answer=provisional.urls())

@given(url=provisional.urls())
@pytest.mark.fuzz
def test_is_url(answer: bool) -> None:
def test_is_url_correct(url: str) -> None:
"""Use Hypothesis to confirm that URLs are correctly recognized/unrecognized."""
str_answer = util.is_url(answer=answer)
if answer:
assert str_answer == "Yes"
else:
assert str_answer == "No"
result = util.is_url(url=url)
assert result == True

0 comments on commit f6c11a6

Please sign in to comment.