Skip to content

Commit

Permalink
changed isapi auth checking request
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-or committed Oct 17, 2024
1 parent 2648587 commit 9941315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/hikvision_next/isapi_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def _detect_auth_method(self):
if not self.session:
self.session = httpx.AsyncClient(timeout=self.timeout)

url = urljoin(self.host, self.isapi_prefix + "/System/status")
url = urljoin(self.host, self.isapi_prefix + "/System/deviceInfo")
for method in [
httpx.BasicAuth(self.username, self.password),
httpx.DigestAuth(self.username, self.password),
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def mock_device_endpoints(model):
def mock_isapi():
"""Mock ISAPI instance."""

respx.get(f"{TEST_HOST}/ISAPI/System/status").respond(status_code=200)
respx.get(f"{TEST_HOST}/ISAPI/System/deviceInfo").respond(status_code=200)
isapi = ISAPI(**TEST_CLIENT)
return isapi

Expand Down

0 comments on commit 9941315

Please sign in to comment.