Add check to ensure devices with lat/lon with _i suffix are supported (#54) (#56)

* Add check to ensure devices with lat/lon with `_i` suffix are supported (#54)

* Add .gitignore for posterity
This commit is contained in:
Matt LeBrun
2017-04-26 12:43:50 -04:00
committed by Teemu R
parent 09e8948790
commit 93d24281c6
4 changed files with 52 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ import datetime
import re
from .. import SmartPlug, SmartPlugException
from .fakes import FakeTransportProtocol, sysinfo_hs110
from .fakes import FakeTransportProtocol, sysinfo_hs110, sysinfo_hs105
PLUG_IP = '192.168.250.186'
SKIP_STATE_TESTS = False
@@ -221,6 +221,11 @@ class TestSmartPlug(TestCase):
def test_location(self):
self.sysinfo_schema(self.plug.location)
def test_location_i(self):
plug_i = SmartPlug(PLUG_IP,
protocol=FakeTransportProtocol(sysinfo_hs105))
self.sysinfo_schema(plug_i.location)
def test_rssi(self):
self.sysinfo_schema({'rssi': self.plug.rssi}) # wrapping for vol