mirror of
				https://github.com/python-kasa/python-kasa.git
				synced 2025-11-04 06:32:07 +00:00 
			
		
		
		
	isort and black on the tests
This commit is contained in:
		@@ -1,11 +1,14 @@
 | 
			
		||||
import asyncio
 | 
			
		||||
import pytest
 | 
			
		||||
import glob
 | 
			
		||||
import json
 | 
			
		||||
import os
 | 
			
		||||
from .newfakes import FakeTransportProtocol
 | 
			
		||||
from os.path import basename
 | 
			
		||||
from pyHS100 import SmartPlug, SmartBulb, SmartStrip, Discover
 | 
			
		||||
 | 
			
		||||
import pytest
 | 
			
		||||
 | 
			
		||||
from pyHS100 import Discover, SmartBulb, SmartPlug, SmartStrip
 | 
			
		||||
 | 
			
		||||
from .newfakes import FakeTransportProtocol
 | 
			
		||||
 | 
			
		||||
SUPPORTED_DEVICES = glob.glob(
 | 
			
		||||
    os.path.dirname(os.path.abspath(__file__)) + "/fixtures/*.json"
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,9 @@
 | 
			
		||||
from ..protocol import TPLinkSmartHomeProtocol
 | 
			
		||||
import logging
 | 
			
		||||
import re
 | 
			
		||||
from voluptuous import Schema, Range, All, Any, Coerce, Invalid, Optional, REMOVE_EXTRA
 | 
			
		||||
 | 
			
		||||
from voluptuous import REMOVE_EXTRA, All, Any, Coerce, Invalid, Optional, Range, Schema
 | 
			
		||||
 | 
			
		||||
from ..protocol import TPLinkSmartHomeProtocol
 | 
			
		||||
 | 
			
		||||
_LOGGER = logging.getLogger(__name__)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,32 +1,32 @@
 | 
			
		||||
import asyncio
 | 
			
		||||
import datetime
 | 
			
		||||
 | 
			
		||||
from unittest.mock import patch
 | 
			
		||||
 | 
			
		||||
import pytest
 | 
			
		||||
 | 
			
		||||
from pyHS100 import DeviceType, SmartStripException, SmartDeviceException
 | 
			
		||||
from .newfakes import (
 | 
			
		||||
    BULB_SCHEMA,
 | 
			
		||||
    PLUG_SCHEMA,
 | 
			
		||||
    FakeTransportProtocol,
 | 
			
		||||
    CURRENT_CONSUMPTION_SCHEMA,
 | 
			
		||||
    TZ_SCHEMA,
 | 
			
		||||
)
 | 
			
		||||
from pyHS100 import DeviceType, SmartDeviceException, SmartStripException
 | 
			
		||||
 | 
			
		||||
from .conftest import (
 | 
			
		||||
    turn_on,
 | 
			
		||||
    handle_turn_on,
 | 
			
		||||
    plug,
 | 
			
		||||
    strip,
 | 
			
		||||
    bulb,
 | 
			
		||||
    color_bulb,
 | 
			
		||||
    non_color_bulb,
 | 
			
		||||
    dimmable,
 | 
			
		||||
    handle_turn_on,
 | 
			
		||||
    has_emeter,
 | 
			
		||||
    no_emeter,
 | 
			
		||||
    dimmable,
 | 
			
		||||
    non_color_bulb,
 | 
			
		||||
    non_dimmable,
 | 
			
		||||
    variable_temp,
 | 
			
		||||
    non_variable_temp,
 | 
			
		||||
    plug,
 | 
			
		||||
    strip,
 | 
			
		||||
    turn_on,
 | 
			
		||||
    variable_temp,
 | 
			
		||||
)
 | 
			
		||||
from .newfakes import (
 | 
			
		||||
    BULB_SCHEMA,
 | 
			
		||||
    CURRENT_CONSUMPTION_SCHEMA,
 | 
			
		||||
    PLUG_SCHEMA,
 | 
			
		||||
    TZ_SCHEMA,
 | 
			
		||||
    FakeTransportProtocol,
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -659,6 +659,6 @@ def test_cache_invalidates(dev):
 | 
			
		||||
 | 
			
		||||
def test_representation(dev):
 | 
			
		||||
    import re
 | 
			
		||||
 | 
			
		||||
    pattern = re.compile("<.* model .* at .* (.*), is_on: .* - dev specific: .*>")
 | 
			
		||||
    assert pattern.match(str(dev))
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,7 @@
 | 
			
		||||
from unittest import TestCase
 | 
			
		||||
from ..protocol import TPLinkSmartHomeProtocol
 | 
			
		||||
import json
 | 
			
		||||
from unittest import TestCase
 | 
			
		||||
 | 
			
		||||
from ..protocol import TPLinkSmartHomeProtocol
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class TestTPLinkSmartHomeProtocol(TestCase):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user