Unittests for ddwrt device tracker and bugfix (#3996)

* BUG Message data cannot be changed thus use voluptuous to ensure format

* Pilight daemon expects JSON serializable data

Thus dict is needed and not a mapping proxy.

* Add explanation why dict as message data is needed

* Use more obvious voluptuous validation scheme

* Pylint:  Trailing whitespace

* Pilight sensor component

* Python 3.4 compatibility

* D202

* Use pytest-caplog and no unittest.TestCase

* Fix setup/teardown of unittests

* Activate coverage testing

* Bugfix whitelist filter and use bugfixed pilight library

* Use newest pilight library that has a bugfix

* Add unittest for pilight hub component

* PEP257 for docstrings

* Bugfix setting device name from host name and small cleanup

- Init with connection error handling is more clear
- Comments clean-up

* PEP257

* New unittest with full coverage

* Upload missing testfixtures

* D209

* Handle double quotes in reply

* Formatting
This commit is contained in:
David-Leon Pohl authored and Paulus Schoutsen committed 2016-10-24 22:18:24 -07:00
1 parent 2604dd89a6
commit e2d23d902a
5 files changed
+290 -20

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
{lan_mac::AA:BB:CC:DD:EE:F0}
{lan_ip::192.168.1.1}
{lan_ip_prefix::192.168.1.}
{lan_netmask::255.255.255.0}
{lan_gateway::0.0.0.0}
{lan_dns::8.8.8.8}
{lan_proto::dhcp}
{dhcp_daemon::DNSMasq}
{dhcp_start::100}
{dhcp_num::50}
{dhcp_lease_time::1440}
{dhcp_leases:: 'device_1','192.168.1.113','AA:BB:CC:DD:EE:00','1 day 00:00:00','113','device_2','192.168.1.201','AA:BB:CC:DD:EE:01','Static','201'}
{pptp_leases::}
{pppoe_leases::}
{arp_table:: 'device_1','192.168.1.113','AA:BB:CC:DD:EE:00','13','device_2','192.168.1.201','AA:BB:CC:DD:EE:01','1'}
{uptime:: 12:28:48 up 132 days, 18:02, load average: 0.15, 0.19, 0.21}
{ipinfo:: IP: 192.168.0.108}
+13
View File
@@ -0,0 +1,13 @@
{wl_mac::AA:BB:CC:DD:EE:FF}
{wl_ssid::WIFI_SSD}
{wl_channel::10}
{wl_radio::Radio is On}
{wl_xmit::Auto}
{wl_rate::72 Mbps}
{wl_ack::}
{active_wireless::'AA:BB:CC:DD:EE:00','eth1','3:13:14','72M','24M','HT20','-9','-92','83','1048','AA:BB:CC:DD:EE:01','eth1','10:48:22','72M','72M','HT20','-40','-92','52','664'}
{active_wds::}
{packet_info::SWRXgoodPacket=173673555;SWRXerrorPacket=27;SWTXgoodPacket=311344396;SWTXerrorPacket=3107;}
{uptime:: 12:29:23 up 132 days, 18:03, load average: 0.16, 0.19, 0.20}
{ipinfo:: IP: 192.168.0.108}