mirror of
https://github.com/home-assistant/core.git
synced 2025-11-10 03:19:34 +00:00
Speed up tests
This commit is contained in:
@@ -7,6 +7,7 @@ Tests Home Assistant HTTP component does what it should do.
|
||||
# pylint: disable=protected-access,too-many-public-methods
|
||||
import unittest
|
||||
import json
|
||||
from unittest.mock import patch
|
||||
|
||||
import requests
|
||||
|
||||
@@ -35,7 +36,9 @@ def _url(path=""):
|
||||
return HTTP_BASE_URL + path
|
||||
|
||||
|
||||
def setUpModule(): # pylint: disable=invalid-name
|
||||
@patch('homeassistant.components.http.util.get_local_ip',
|
||||
return_value='127.0.0.1')
|
||||
def setUpModule(mock_get_local_ip): # pylint: disable=invalid-name
|
||||
""" Initalizes a Home Assistant server. """
|
||||
global hass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user