mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Add Abode tests (#32562)
* Add tests for several devices * Update coveragerc * Code review changes and minor clean up * More code review changes * Update manifest and minor test updates * Add test for locks and covers * Add tests for switch on and off * Add more complete test for alarms * Fix for camera test * Patch abodepy.mode for tests * Add test for unknown alarm state and minor cleanup * Update to make tests more robust * More specific tests * Update quality scale to silver * Remove integration quality scale
This commit is contained in:
22
tests/components/abode/conftest.py
Normal file
22
tests/components/abode/conftest.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Configuration for Abode tests."""
|
||||
import abodepy.helpers.constants as CONST
|
||||
import pytest
|
||||
|
||||
from tests.common import load_fixture
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def requests_mock_fixture(requests_mock):
|
||||
"""Fixture to provide a requests mocker."""
|
||||
# Mocks the login response for abodepy.
|
||||
requests_mock.post(CONST.LOGIN_URL, text=load_fixture("abode_login.json"))
|
||||
# Mocks the oauth claims response for abodepy.
|
||||
requests_mock.get(
|
||||
CONST.OAUTH_TOKEN_URL, text=load_fixture("abode_oauth_claims.json")
|
||||
)
|
||||
# Mocks the panel response for abodepy.
|
||||
requests_mock.get(CONST.PANEL_URL, text=load_fixture("abode_panel.json"))
|
||||
# Mocks the automations response for abodepy.
|
||||
requests_mock.get(CONST.AUTOMATION_URL, text=load_fixture("abode_automation.json"))
|
||||
# Mocks the devices response for abodepy.
|
||||
requests_mock.get(CONST.DEVICES_URL, text=load_fixture("abode_devices.json"))
|
||||
Reference in New Issue
Block a user