mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 03:35:09 +02:00
Add config flow for Hue (#12830)
* Add config flow for Hue * Upgrade to aiohue 0.2 * Fix tests * Add tests * Add aiohue to test requirements * Bump aiohue dependency * Lint * Lint * Fix aiohttp mock * Lint * Fix tests
This commit is contained in:
22
tests/test_util/test_aiohttp.py
Normal file
22
tests/test_util/test_aiohttp.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Tests for our aiohttp mocker."""
|
||||
from .aiohttp import AiohttpClientMocker
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
async def test_matching_url():
|
||||
"""Test we can match urls."""
|
||||
mocker = AiohttpClientMocker()
|
||||
mocker.get('http://example.com')
|
||||
await mocker.match_request('get', 'http://example.com/')
|
||||
|
||||
mocker.clear_requests()
|
||||
|
||||
with pytest.raises(AssertionError):
|
||||
await mocker.match_request('get', 'http://example.com/')
|
||||
|
||||
mocker.clear_requests()
|
||||
|
||||
mocker.get('http://example.com?a=1')
|
||||
await mocker.match_request('get', 'http://example.com/',
|
||||
params={'a': 1, 'b': 2})
|
Reference in New Issue
Block a user