Fix up docstring for tests (#5090)
This commit is contained in:
1 parent
98efbbc129
commit
f0b1874d2d
19 files changed
+61
-59
No files matched your search
@@ -75,7 +75,7 @@ class TestHttp:
|
||||
assert req.status_code == 403
|
||||
|
||||
def test_access_from_banned_ip_when_ban_is_off(self):
|
||||
"""Test accessing to server from banned IP when feature is off"""
|
||||
"""Test accessing to server from banned IP when feature is off."""
|
||||
hass.http.app[KEY_BANS_ENABLED] = False
|
||||
for remote_addr in BANNED_IPS:
|
||||
with patch('homeassistant.components.http.'
|
||||
@@ -87,7 +87,7 @@ class TestHttp:
|
||||
assert req.status_code == 200
|
||||
|
||||
def test_ip_bans_file_creation(self):
|
||||
"""Testing if banned IP file created"""
|
||||
"""Testing if banned IP file created."""
|
||||
hass.http.app[KEY_BANS_ENABLED] = True
|
||||
hass.http.app[KEY_LOGIN_THRESHOLD] = 1
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ class TestCors:
|
||||
|
||||
def test_cors_allowed_with_password_in_url(self):
|
||||
"""Test cross origin resource sharing with password in url."""
|
||||
|
||||
req = requests.get(_url(const.URL_API),
|
||||
params={'api_password': API_PASSWORD},
|
||||
headers={const.HTTP_HEADER_ORIGIN: HTTP_BASE_URL})
|
||||
@@ -119,6 +118,7 @@ class TestCors:
|
||||
|
||||
|
||||
class TestView(http.HomeAssistantView):
|
||||
"""Test the HTTP views."""
|
||||
|
||||
name = 'test'
|
||||
url = '/hello'
|
||||
@@ -159,7 +159,6 @@ def test_registering_view_while_running(hass, test_client):
|
||||
|
||||
def test_api_base_url(loop):
|
||||
"""Test setting api url."""
|
||||
|
||||
hass = MagicMock()
|
||||
hass.loop = loop
|
||||
|
||||
|
||||
Reference in new issue
Block a user