diff --git a/zulip_bots/zulip_bots/bots/weather/test_weather.py b/zulip_bots/zulip_bots/bots/weather/test_weather.py index bfbb259..f3342c1 100644 --- a/zulip_bots/zulip_bots/bots/weather/test_weather.py +++ b/zulip_bots/zulip_bots/bots/weather/test_weather.py @@ -33,7 +33,7 @@ class TestWeatherBot(BotTestCase): ) # Only country query: returns the weather of the capital city - bot_response = "Weather in London, GB:\n58.33 F / 14.85 C\nShower Rain" + bot_response = "Weather in London, GB:\n58.73 F / 14.85 C\nShower Rain" with self.mock_config_info({'key': '123456'}), \ self.mock_http_conversation('test_only_country'): self.initialize_bot() diff --git a/zulip_bots/zulip_bots/bots/weather/weather.py b/zulip_bots/zulip_bots/bots/weather/weather.py index c0449f0..08a815b 100644 --- a/zulip_bots/zulip_bots/bots/weather/weather.py +++ b/zulip_bots/zulip_bots/bots/weather/weather.py @@ -53,6 +53,6 @@ def to_celsius(temp_kelvin): def to_fahrenheit(temp_kelvin): - return int(temp_kelvin) * 9 / 5 - 459.67 + return int(temp_kelvin) * (9. / 5.) - 459.67 handler_class = WeatherHandler