From 0a5d83f41d0e79c36f68c9e276bcd3b2ddc12654 Mon Sep 17 00:00:00 2001 From: Ryan Frederich Date: Mon, 12 Aug 2024 12:14:51 -0700 Subject: [PATCH 1/3] test fix --- tests/test_api.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 9cdc1ff..a6bd0e9 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -71,4 +71,9 @@ def test_seperate_args_and_get_location(): """ location = ["location=pleasure_point_california"] location_data = seperate_args_and_get_location(location) - assert "Santa Cruz County" in location_data["city"][0] + lat = location_data["lat"] + long = location_data["long"] + city = location_data["city"] + assert isinstance(lat, (int, float)) + assert isinstance(long, (int, float)) + assert "Pleasure Point" in str(location_data["city"]) \ No newline at end of file From c177b2a4c940555f833378e221d2b148824ec7b4 Mon Sep 17 00:00:00 2001 From: Ryan Frederich Date: Mon, 12 Aug 2024 12:17:37 -0700 Subject: [PATCH 2/3] using the city var --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index a6bd0e9..718a3f3 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -76,4 +76,4 @@ def test_seperate_args_and_get_location(): city = location_data["city"] assert isinstance(lat, (int, float)) assert isinstance(long, (int, float)) - assert "Pleasure Point" in str(location_data["city"]) \ No newline at end of file + assert "Pleasure Point" in str(city) \ No newline at end of file From fd6bc4063a4e87e67021fa0b032e31fd7943a8ea Mon Sep 17 00:00:00 2001 From: Ryan Frederich Date: Mon, 12 Aug 2024 12:20:17 -0700 Subject: [PATCH 3/3] linting --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 718a3f3..2aa186c 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -76,4 +76,4 @@ def test_seperate_args_and_get_location(): city = location_data["city"] assert isinstance(lat, (int, float)) assert isinstance(long, (int, float)) - assert "Pleasure Point" in str(city) \ No newline at end of file + assert "Pleasure Point" in str(city)