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:
1 parent
2c7e895105
commit
962e5315ab
2 files changed
+3
-1
No files matched your search
Regular → Executable
File mode changed.
@@ -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': {
|
||||||
|
|||||||
Reference in new issue
Block a user