test: add local 2x2 route topology

This commit is contained in:
2026-07-23 03:14:16 +00:00
parent 10e803eaee
commit a66269cb69
27 changed files with 775 additions and 7 deletions
+6 -2
View File
@@ -125,10 +125,14 @@ class QBittorrentReader:
headers={"Content-Type": "application/x-www-form-urlencoded"},
)
try:
response = self._read(self._opener.open(call, timeout=self.timeout), 64)
login_response = self._opener.open(call, timeout=self.timeout)
login_status = getattr(login_response, "status", 200)
response = self._read(login_response, 64)
except (error.URLError, OSError) as exc:
raise QBittorrentError("qBittorrent authentication failed") from exc
if response.strip() != b"Ok.":
if response.strip() != b"Ok." and not (
login_status == 204 and not response.strip()
):
raise QBittorrentError("qBittorrent authentication failed")
self._authenticated = True