Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions homeassistant/components/apns/const.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Constants for the apns component."""
DOMAIN = "apns"
6 changes: 3 additions & 3 deletions homeassistant/components/apns/notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from homeassistant.components.notify import (
ATTR_DATA,
ATTR_TARGET,
DOMAIN,
PLATFORM_SCHEMA,
BaseNotificationService,
)
Expand All @@ -18,13 +17,14 @@
from homeassistant.helpers import template as template_helper
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_state_change
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAIN

from .const import DOMAIN

APNS_DEVICES = "apns.yaml"
CONF_CERTFILE = "cert_file"
CONF_TOPIC = "topic"
CONF_SANDBOX = "sandbox"
DEVICE_TRACKER_DOMAIN = "device_tracker"
SERVICE_REGISTER = "apns_register"

ATTR_PUSH_ID = "push_id"

Expand Down
8 changes: 4 additions & 4 deletions tests/components/apns/test_notify.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def fake_write(_out, device):
self._setup_notify()

assert self.hass.services.call(
notify.DOMAIN,
apns.DOMAIN,
"apns_test_app",
{"push_id": "1234", "name": "test device"},
blocking=True,
Expand Down Expand Up @@ -153,7 +153,7 @@ def fake_write(_out, device):
self._setup_notify()

assert self.hass.services.call(
notify.DOMAIN, "apns_test_app", {"push_id": "1234"}, blocking=True
apns.DOMAIN, "apns_test_app", {"push_id": "1234"}, blocking=True
)

devices = {dev.push_id: dev for dev in written_devices}
Expand Down Expand Up @@ -183,7 +183,7 @@ def fake_write(_out, device):
self._setup_notify()

assert self.hass.services.call(
notify.DOMAIN,
apns.DOMAIN,
"apns_test_app",
{"push_id": "1234", "name": "updated device 1"},
blocking=True,
Expand Down Expand Up @@ -222,7 +222,7 @@ def fake_write(_out, device):
self._setup_notify()

assert self.hass.services.call(
notify.DOMAIN,
apns.DOMAIN,
"apns_test_app",
{"push_id": "1234", "name": "updated device 1"},
blocking=True,
Expand Down