mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 23:27:37 +00:00
Mock call to google servers (#4532)
* Fix for #4520 * mock call to do_auth to prevent call to google servers
This commit is contained in:
parent
2c7e895105
commit
962e5315ab
0
tests/components/calendar/test_google.py
Normal file → Executable file
0
tests/components/calendar/test_google.py
Normal file → Executable file
@ -1,6 +1,7 @@
|
|||||||
"""The tests for the Google Calendar component."""
|
"""The tests for the Google Calendar component."""
|
||||||
import logging
|
import logging
|
||||||
import unittest
|
import unittest
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
import homeassistant.components.google as google
|
import homeassistant.components.google as google
|
||||||
from homeassistant.bootstrap import setup_component
|
from homeassistant.bootstrap import setup_component
|
||||||
@ -20,7 +21,8 @@ class TestGoogle(unittest.TestCase):
|
|||||||
"""Stop everything that was started."""
|
"""Stop everything that was started."""
|
||||||
self.hass.stop()
|
self.hass.stop()
|
||||||
|
|
||||||
def test_setup_component(self):
|
@patch('homeassistant.components.google.do_authentication')
|
||||||
|
def test_setup_component(self, mock_do_auth):
|
||||||
"""Test setup component."""
|
"""Test setup component."""
|
||||||
config = {
|
config = {
|
||||||
'google': {
|
'google': {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user