Flaky tests (#12931)
* Skip flaky DDWRT tests * Import APNS before running tests
This commit is contained in:
1 parent
6a5c7ef43f
commit
60d7e32f81
3 files changed
+5
-2
No files matched your search
@@ -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()
|
||||
|
||||
|
||||
Reference in new issue
Block a user