Skip to content

Commit

Permalink
Merge branch 'percamera_snooze' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
austinc3030 authored Jul 7, 2024
2 parents 8e67f68 + 9d921b9 commit b24ec66
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blinkpy/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,4 +667,4 @@ async def async_snooze(self):
)
if res and res.status == 200:
return await res.json()
return None
return None
8 changes: 8 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,11 @@ async def test_wait_for_command(self, mock_resp):

response = await api.wait_for_command(self.blink, None)
self.assertFalse(response)

async def test_request_camera_snooze(self, mock_resp):
"""Test request_camera_snooze."""
mock_resp.return_value = mresp.MockResponse({}, 200)
response = await api.request_camera_snooze(
self.blink, "network", "camera_id", "catalina", {}
)
self.assertEqual(response.status, 200)
4 changes: 3 additions & 1 deletion tests/test_cameras.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

from unittest import mock
from unittest import IsolatedAsyncioTestCase
from unittest.mock import MagicMock
from blinkpy.blinkpy import Blink
from blinkpy.helpers.util import BlinkURLHandler
from blinkpy.sync_module import BlinkSyncModule
from blinkpy.camera import BlinkCamera, BlinkCameraMini, BlinkDoorbell
import tests.mock_responses as mresp


CONFIG = {
"name": "new",
"id": 1234,
Expand Down Expand Up @@ -176,4 +178,4 @@ async def test_new_thumb_url_returned(self, mock_resp):
await self.camera.update(config, expire_clips=False)
self.assertEqual(
self.camera.thumbnail, f"https://rest-test.immedia-semi.com{thumb_return}"
)
)

0 comments on commit b24ec66

Please sign in to comment.