Upgrade black to 20.8b1 (#39287)

This commit is contained in:
Franck Nijhof 2020-08-27 13:56:20 +02:00 committed by GitHub
parent 0d7eec710c
commit 1c2ebdf307
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
574 changed files with 4389 additions and 1725 deletions

View file

@ -20,7 +20,8 @@ from tests.common import MockConfigEntry, load_fixture
@patch(
"datapoint.Forecast.datetime.datetime", NewDateTime,
"datapoint.Forecast.datetime.datetime",
NewDateTime,
)
async def test_one_sensor_site_running(hass, requests_mock, legacy_patchable_time):
"""Test the Met Office sensor platform."""
@ -31,10 +32,14 @@ async def test_one_sensor_site_running(hass, requests_mock, legacy_patchable_tim
requests_mock.get("/public/data/val/wxfcs/all/json/sitelist/", text=all_sites)
requests_mock.get(
"/public/data/val/wxfcs/all/json/354107?res=3hourly", text=wavertree_hourly,
"/public/data/val/wxfcs/all/json/354107?res=3hourly",
text=wavertree_hourly,
)
entry = MockConfigEntry(domain=DOMAIN, data=METOFFICE_CONFIG_WAVERTREE,)
entry = MockConfigEntry(
domain=DOMAIN,
data=METOFFICE_CONFIG_WAVERTREE,
)
entry.add_to_hass(hass)
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
@ -57,7 +62,8 @@ async def test_one_sensor_site_running(hass, requests_mock, legacy_patchable_tim
@patch(
"datapoint.Forecast.datetime.datetime", NewDateTime,
"datapoint.Forecast.datetime.datetime",
NewDateTime,
)
async def test_two_sensor_sites_running(hass, requests_mock, legacy_patchable_time):
"""Test we handle two sets of sensors running for two different sites."""
@ -76,10 +82,16 @@ async def test_two_sensor_sites_running(hass, requests_mock, legacy_patchable_ti
"/public/data/val/wxfcs/all/json/322380?res=3hourly", text=kingslynn_hourly
)
entry = MockConfigEntry(domain=DOMAIN, data=METOFFICE_CONFIG_WAVERTREE,)
entry = MockConfigEntry(
domain=DOMAIN,
data=METOFFICE_CONFIG_WAVERTREE,
)
entry.add_to_hass(hass)
await hass.config_entries.async_setup(entry.entry_id)
entry2 = MockConfigEntry(domain=DOMAIN, data=METOFFICE_CONFIG_KINGSLYNN,)
entry2 = MockConfigEntry(
domain=DOMAIN,
data=METOFFICE_CONFIG_KINGSLYNN,
)
entry2.add_to_hass(hass)
await hass.config_entries.async_setup(entry2.entry_id)
await hass.async_block_till_done()