Skip to content

Commit

Permalink
Fix comparison constant position (#145)
Browse files Browse the repository at this point in the history
* Fix comparison constant position

* format with black

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Akash Mahanty <akamhy@yahoo.com>
  • Loading branch information
deepsource-autofix[bot] and akamhy authored Feb 8, 2022
1 parent 0b63159 commit e0dfbe0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/test_availability_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_no_api_call_str_repr() -> None:
availability_api = WaybackMachineAvailabilityAPI(
url=f"https://{rndstr(30)}.gov", user_agent=user_agent
)
assert "" == str(availability_api)
assert str(availability_api) == ""


def test_no_call_timestamp() -> None:
Expand Down
16 changes: 9 additions & 7 deletions tests/test_cdx_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@ def test_full_url() -> None:
assert endpoint == full_url(endpoint, params)

params = {"a": "1"}
assert "https://web.archive.org/cdx/search/cdx?a=1" == full_url(endpoint, params)
assert "https://web.archive.org/cdx/search/cdx?a=1" == full_url(
endpoint + "?", params
assert full_url(endpoint, params) == "https://web.archive.org/cdx/search/cdx?a=1"
assert (
full_url(endpoint + "?", params) == "https://web.archive.org/cdx/search/cdx?a=1"
)

params["b"] = 2
assert "https://web.archive.org/cdx/search/cdx?a=1&b=2" == full_url(
endpoint + "?", params
assert (
full_url(endpoint + "?", params)
== "https://web.archive.org/cdx/search/cdx?a=1&b=2"
)

params["c"] = "foo bar"
assert "https://web.archive.org/cdx/search/cdx?a=1&b=2&c=foo%20bar" == full_url(
endpoint + "?", params
assert (
full_url(endpoint + "?", params)
== "https://web.archive.org/cdx/search/cdx?a=1&b=2&c=foo%20bar"
)


Expand Down

0 comments on commit e0dfbe0

Please sign in to comment.