mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-01 02:53:00 +02:00
Allow map uploader to follow redirects. Closes #123.
This commit is contained in:
@@ -111,7 +111,10 @@ class MapUploadModule(FanoutModule):
|
||||
self._seen: dict[str, int] = {}
|
||||
|
||||
async def start(self) -> None:
|
||||
self._client = httpx.AsyncClient(timeout=httpx.Timeout(15.0))
|
||||
self._client = httpx.AsyncClient(
|
||||
timeout=httpx.Timeout(15.0),
|
||||
follow_redirects=True,
|
||||
)
|
||||
self._last_error = None
|
||||
self._seen.clear()
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@ class TestMapUploadLifecycle:
|
||||
mod = _make_module()
|
||||
await mod.start()
|
||||
assert mod._client is not None
|
||||
assert mod._client.follow_redirects is True
|
||||
assert mod.status == "connected"
|
||||
await mod.stop()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user