From e0dfbe0b7dd861562bddca5858eabbd253f8cba1 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 10:06:23 +0530 Subject: [PATCH] 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 --- tests/test_availability_api.py | 2 +- tests/test_cdx_utils.py | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/test_availability_api.py b/tests/test_availability_api.py index e74854b..f3e0548 100644 --- a/tests/test_availability_api.py +++ b/tests/test_availability_api.py @@ -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: diff --git a/tests/test_cdx_utils.py b/tests/test_cdx_utils.py index ae92147..6a57e2f 100644 --- a/tests/test_cdx_utils.py +++ b/tests/test_cdx_utils.py @@ -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" )