Skip to content

Commit

Permalink
Fix linting problems
Browse files Browse the repository at this point in the history
  • Loading branch information
Miicroo committed Oct 8, 2024
1 parent 1a6f787 commit 0cac0d5
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""Test component setup."""
from homeassistant.util import slugify

from custom_components.birthdays import DOMAIN, CONF_BIRTHDAYS, CONF_GLOBAL_CONFIG, CONF_ATTRIBUTES

from custom_components.birthdays import (
CONF_ATTRIBUTES,
CONF_BIRTHDAYS,
CONF_GLOBAL_CONFIG,
DOMAIN,
)
from homeassistant.setup import async_setup_component


Expand All @@ -14,7 +16,7 @@ async def test_async_setup__old_config_0_birthday_is_not_ok(hass):

async def test_async_setup__old_config_1_birthday_is_ok(hass):
"""1 birthday is OK in old config."""
config = {DOMAIN: [{'name': 'HomeAssistant', 'date_of_birth': '2013-09-17'}]}
config = {DOMAIN: [{"name": "HomeAssistant", "date_of_birth": "2013-09-17"}]}
await _test_setup(hass, config, True)


Expand All @@ -26,23 +28,21 @@ async def test_async_setup__new_config_0_birthday_is_not_ok(hass):

async def test_async_setup__new_config_1_birthday_is_ok(hass):
"""1 birthday is OK in new config."""
config = {DOMAIN: {CONF_BIRTHDAYS: [{'name': 'HomeAssistant', 'date_of_birth': '2013-09-17'}]}}
config = {
DOMAIN: {
CONF_BIRTHDAYS: [{"name": "HomeAssistant", "date_of_birth": "2013-09-17"}]
}
}
await _test_setup(hass, config, True)


async def test_async_setup__new_config_has_global_attributes(hass):
"""Global attributes are allowed in schema"""
name = 'HomeAssistant'
"""Global attributes are allowed in schema."""
name = "HomeAssistant"
config = {
DOMAIN: {
CONF_BIRTHDAYS: [
{'name': name, 'date_of_birth': '2013-09-17'}
],
CONF_GLOBAL_CONFIG: {
CONF_ATTRIBUTES: {
'message': 'Hello World!'
}
}
CONF_BIRTHDAYS: [{"name": name, "date_of_birth": "2013-09-17"}],
CONF_GLOBAL_CONFIG: {CONF_ATTRIBUTES: {"message": "Hello World!"}},
}
}

Expand Down

0 comments on commit 0cac0d5

Please sign in to comment.