diff --git a/aiocloudweather/proxy.py b/aiocloudweather/proxy.py index 6c17dac..625de6d 100644 --- a/aiocloudweather/proxy.py +++ b/aiocloudweather/proxy.py @@ -33,14 +33,14 @@ async def forward_wunderground(self, request: web.Request) -> web.Response: """Forward Wunderground data to their API.""" query_string = quote(request.query_string).replace("%20", "+") url = f"https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?{query_string}" - _LOGGER.debug(f"Forwarding Wunderground data: {url}") + _LOGGER.debug("Forwarding Wunderground data: %s", url) return await self.session.get(url) async def forward_weathercloud(self, request: web.Request) -> web.Response: """Forward WeatherCloud data to their API.""" new_path = request.path[request.path.index("/v01/set") :] url = f"https://api.weathercloud.net{new_path}" - _LOGGER.debug(f"Forwarding WeatherCloud data: {url}") + _LOGGER.debug("Forwarding WeatherCloud data: %s", url) return await self.session.get(url) async def forward(self, sink: DataSink, request: web.Request) -> web.Response: diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..6a7d170 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +asyncio_default_fixture_loop_scope = function \ No newline at end of file diff --git a/tests/test_server.py b/tests/test_server.py index 9381554..b8f448c 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -1,4 +1,3 @@ -import asyncio import pytest from aiohttp import web from aiocloudweather.server import CloudWeatherListener