Fix comparison constant position (#145)

* 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>
This commit is contained in:
deepsource-autofix[bot] 2022-02-08 10:06:23 +05:30 committed by GitHub
parent 0b631592ea
commit e0dfbe0b7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -99,7 +99,7 @@ def test_no_api_call_str_repr() -> None:
availability_api = WaybackMachineAvailabilityAPI( availability_api = WaybackMachineAvailabilityAPI(
url=f"https://{rndstr(30)}.gov", user_agent=user_agent url=f"https://{rndstr(30)}.gov", user_agent=user_agent
) )
assert "" == str(availability_api) assert str(availability_api) == ""
def test_no_call_timestamp() -> None: def test_no_call_timestamp() -> None:

View File

@ -28,19 +28,21 @@ def test_full_url() -> None:
assert endpoint == full_url(endpoint, params) assert endpoint == full_url(endpoint, params)
params = {"a": "1"} params = {"a": "1"}
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 "https://web.archive.org/cdx/search/cdx?a=1" == full_url( assert (
endpoint + "?", params full_url(endpoint + "?", params) == "https://web.archive.org/cdx/search/cdx?a=1"
) )
params["b"] = 2 params["b"] = 2
assert "https://web.archive.org/cdx/search/cdx?a=1&b=2" == full_url( assert (
endpoint + "?", params full_url(endpoint + "?", params)
== "https://web.archive.org/cdx/search/cdx?a=1&b=2"
) )
params["c"] = "foo bar" params["c"] = "foo bar"
assert "https://web.archive.org/cdx/search/cdx?a=1&b=2&c=foo%20bar" == full_url( assert (
endpoint + "?", params full_url(endpoint + "?", params)
== "https://web.archive.org/cdx/search/cdx?a=1&b=2&c=foo%20bar"
) )