core/homeassistant/components/calendar
Philip Rosenberg-Watt 81cf0dacfe Fix Google Calendar caching when offline (#13375)
* Fix Google Calendar caching when offline

Events from Google Calendar were not firing under the following
circumstances:

1. Start ha as normal with Google Calendar configured as per
   instructions.
2. ha loses network connectivity to Google
3. ha attempts update of Google Calendar
4. calendar/google component throws uncaught Exception causing update
   method to not return
5. (cached) Google Calendar event does not fire, remains "Off"

Catching the Exception and returning False from the update() method
causes the correct behavior (i.e., the calendar component firing the
event as scheduled using cached data).

* Add requirements

* Revert code cleanup

* Remove explicit return value from update()

* Revert "Remove explicit return value from update()"

This reverts commit 7cd77708af.

* Use MockDependency decorator

No need to whitelist google-python-api-client for a single unit test at
this point.
2018-03-26 18:10:22 -07:00
..
__init__.py Add support for Todoist platform (#9236) 2017-09-14 07:27:12 +02:00
caldav.py Try to fix caldav (#13236) 2018-03-15 10:58:11 -07:00
demo.py Remove execution file perm (#11563) 2018-01-09 23:55:14 -08:00
google.py Fix Google Calendar caching when offline (#13375) 2018-03-26 18:10:22 -07:00
services.yaml Update services.yaml files (#10229) 2017-10-30 21:39:12 +01:00
todoist.py Fix 'dict' object has no attribute 'strftime' (#13215) 2018-03-15 21:43:20 +01:00