Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #91 from tchellomello/pyarlo_0.1.9
Browse files Browse the repository at this point in the history
Version 0.1.9
  • Loading branch information
tchellomello committed Jul 2, 2018
2 parents 0dfd600 + adae8d9 commit f55bf71
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions pyarlo/base_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ def update(self):

if current_time >= (last_refresh + self._refresh_rate):
self.get_cameras_properties()
self.get_ambient_sensor_data()
self._attrs = self._session.refresh_attributes(self.name)
self._attrs = assert_is_dict(self._attrs)
_LOGGER.debug("Called base station update of camera properties: "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def readme():
setup(
name='pyarlo',
packages=['pyarlo'],
version='0.1.8',
version='0.1.9',
description='Python Arlo is a library written in Python 2.7/3x ' +
'that exposes the Netgear Arlo cameras as Python objects.',
long_description=readme(),
Expand Down
1 change: 1 addition & 0 deletions tests/test_base_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def test_get_properties(self, mock):

@requests_mock.Mocker()
@patch.object(ArloBaseStation, "publish_and_get_event", load_camera_props)
@patch.object(ArloBaseStation, "get_ambient_sensor_data", MagicMock())
def test_camera_properties(self, mock):
"""Test ArloBaseStation.get_cameras_properties."""
base = self.load_base_station(mock)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
open_fixture
)

from mock import patch
from mock import patch, MagicMock
from pyarlo import PyArlo, ArloBaseStation
from pyarlo.camera import ArloCamera
from pyarlo.const import (
Expand Down Expand Up @@ -43,6 +43,7 @@ def load_arlo(self, mock):

@requests_mock.Mocker()
@patch.object(ArloBaseStation, "publish_and_get_event", load_camera_props)
@patch.object(ArloBaseStation, "get_ambient_sensor_data", MagicMock())
def test_camera_properties(self, mock):
"""Test ArloCamera properties."""
arlo = self.load_arlo(mock)
Expand Down
4 changes: 3 additions & 1 deletion tests/test_modes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""The tests for the PyArlo platform."""
import unittest
from functools import partial
from mock import patch
from mock import patch, MagicMock
from pyarlo import ArloBaseStation, PyArlo
from tests.common import load_fixture, load_camera_schedule

Expand Down Expand Up @@ -84,6 +84,7 @@ def test_available_modes(self, mock):

@requests_mock.Mocker()
@patch.object(ArloBaseStation, "publish_and_get_event", load_modes)
@patch.object(ArloBaseStation, "get_ambient_sensor_data", MagicMock())
def test_set_mode(self, mock):
"""Test PyArlo BaseStation.mode property."""
notify_url = NOTIFY_ENDPOINT.format("48b14cbbbbbbb")
Expand All @@ -108,6 +109,7 @@ def test_set_mode(self, mock):
@requests_mock.Mocker()
@patch.object(ArloBaseStation, "publish_and_get_event",
partial(load_camera_schedule, active=True))
@patch.object(ArloBaseStation, "get_ambient_sensor_data", MagicMock)
def test_set_schedule_mode(self, mock):
"""Test PyArlo BaseStation.mode property."""
notify_url = NOTIFY_ENDPOINT.format("48b14cbbbbbbb")
Expand Down

0 comments on commit f55bf71

Please sign in to comment.