From d684fb344148c37f8863ddab0e7e82a40b18b6b9 Mon Sep 17 00:00:00 2001 From: David Bures <12524436+PiDiBi@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:51:13 -0700 Subject: [PATCH] test replacements as part of get_wether --- locationdata_test.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/locationdata_test.py b/locationdata_test.py index ad61735..108372f 100644 --- a/locationdata_test.py +++ b/locationdata_test.py @@ -11,7 +11,26 @@ class TestGetWeather(unittest.TestCase): print(f"weather: {weather}") self.assertNotEqual(weather, NO_DATA_NOGPS) self.assertNotEqual(weather, ERROR_FETCHING_DATA) - + # test replacement works + self.assertNotIn(weather, "Sunday") + self.assertNotIn(weather, "Monday") + self.assertNotIn(weather, "Tuesday") + self.assertNotIn(weather, "Wednesday") + self.assertNotIn(weather, "Thursday") + self.assertNotIn(weather, "Friday") + self.assertNotIn(weather, "Saturday") + self.assertNotIn(weather, "northwest") + self.assertNotIn(weather, "northeast") + self.assertNotIn(weather, "southwest") + self.assertNotIn(weather, "southeast") + self.assertNotIn(weather, "north") + self.assertNotIn(weather, "south") + self.assertNotIn(weather, "east") + self.assertNotIn(weather, "west") + self.assertNotIn(weather, "precipitation") + self.assertNotIn(weather, "showers") + self.assertNotIn(weather, "thunderstorms") + def test_get_weather_with_invalid_coordinates(self): # Test with invalid coordinates lat = 0