Flaky tests (#12931)
* Skip flaky DDWRT tests * Import APNS before running tests
This commit is contained in:
parent
6a5c7ef43f
commit
60d7e32f81
3 changed files with 5 additions and 2 deletions
|
@ -367,6 +367,7 @@ omit =
|
|||
homeassistant/components/device_tracker/bluetooth_tracker.py
|
||||
homeassistant/components/device_tracker/bt_home_hub_5.py
|
||||
homeassistant/components/device_tracker/cisco_ios.py
|
||||
homeassistant/components/device_tracker/ddwrt.py
|
||||
homeassistant/components/device_tracker/fritz.py
|
||||
homeassistant/components/device_tracker/gpslogger.py
|
||||
homeassistant/components/device_tracker/hitron_coda.py
|
||||
|
|
|
@ -7,6 +7,8 @@ import re
|
|||
import requests
|
||||
import requests_mock
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant import config
|
||||
from homeassistant.setup import setup_component
|
||||
from homeassistant.components import device_tracker
|
||||
|
@ -25,6 +27,7 @@ TEST_HOST = '127.0.0.1'
|
|||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@pytest.mark.skip
|
||||
class TestDdwrt(unittest.TestCase):
|
||||
"""Tests for the Ddwrt device tracker platform."""
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ import io
|
|||
import unittest
|
||||
from unittest.mock import Mock, patch, mock_open
|
||||
|
||||
from apns2.errors import Unregistered
|
||||
import yaml
|
||||
|
||||
import homeassistant.components.notify as notify
|
||||
|
@ -358,8 +359,6 @@ class TestApns(unittest.TestCase):
|
|||
@patch('homeassistant.components.notify.apns._write_device')
|
||||
def test_disable_when_unregistered(self, mock_write, mock_client):
|
||||
"""Test disabling a device when it is unregistered."""
|
||||
from apns2.errors import Unregistered
|
||||
|
||||
send = mock_client.return_value.send_notification
|
||||
send.side_effect = Unregistered()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue