Skip to content

Commit

Permalink
Fix minor test issues (#847)
Browse files Browse the repository at this point in the history
- Include a comma in the tested-for 'wrong' query parts
- Test the `raw_parts` value against an expected value and not against
  itself.

Both issues were caught by CodeQL scans.
  • Loading branch information
mjpieters authored Apr 19, 2023
1 parent eb2f08f commit d0ee035
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_update_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_with_query_list_of_pairs():
def test_with_query_list_non_pairs():
url = URL("http://example.com")
with pytest.raises(ValueError):
url.with_query(["a=1", "b=2" "c=3"])
url.with_query(["a=1", "b=2", "c=3"])


def test_with_query_kwargs():
Expand Down
2 changes: 1 addition & 1 deletion tests/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def test_raw_parts_for_relative_path_starting_from_slash():

def test_raw_parts_for_relative_double_path():
url = URL("path/to")
assert url.raw_parts == url.raw_parts
assert ("path", "to") == url.raw_parts


def test_parts_for_empty_url():
Expand Down

0 comments on commit d0ee035

Please sign in to comment.