Commit graph

10 commits

Author SHA1 Message Date
Scott Bradshaw
37a8035c54 Added support for alternate SSH ports in AsusWRT () ()
* Added support for alternate SSH ports in AsusWRT ()

* Always set the SSH port in SSH arguments

* Removed whitespace

* Adding port=22 to the mock calls

* Changed config.get(CONF_PORT)  to config[CONF_PORT] per feedback from @pvizeli
2017-02-20 09:06:50 +01:00
Paulus Schoutsen
c54517de90 Convert config.components to a set () 2017-02-09 20:21:57 +02:00
Paulus Schoutsen
aa1e4c564c Fix tests closing properly () 2017-01-07 01:47:25 +01:00
Johann Kellerman
57f32fa629 Fixup device_tracekt.mqtt voluptuous & unit tests () 2016-10-18 18:10:28 -07:00
Rob Capellini
4891ca1610 Removing calls to mock.assert_called_once_with ()
If a mock's assert_called_once_with method is misspelled (e.g. asert_called_once_with) then the test will appear as passing.  Therefore, this commit removes all instances of assert_called_once_with calls and replaces them with two assertions:

        self.assertEqual(mock.call_count, 1)
        self.assertEqual(mock.call_args, mock.call(call_args))
2016-10-16 16:13:27 -07:00
Johann Kellerman
7b40a641ec Continue on invalid platforms and new setup_component unit tests () 2016-10-08 11:27:35 -07:00
Johann Kellerman
91a3522100 Improve voluptuous and login errors for Asus device tracker () 2016-09-03 17:32:43 -06:00
Johann Kellerman
6f1c97b9d3 Voluptuous for AsusWRT ()
* Voluptuous for AsusWRT
2016-08-27 22:30:06 +02:00
Matthew Treinish
aa3d0e1047 Fix incorrect check on presence of password and pub_key ()
This commit fixes an issue with the use of None in default values
for the config get() calls in __init__() of AsusWrtDeviceScanner.
These values are cast as strings and when a NoneType is cast it
returns the string "None" this broke the check for the existence
of these fields. This commit fixes the issue by changing the default
value to be an empty string '' which will conform with the behavior
expected by the ssh login code.

Closes 
2016-06-22 17:01:39 -07:00
Matthew Treinish
1381984b77 Add ssh public key support to the asuswrt component ()
The pexpect.pxssh module has support for using public key
authentication. [1] This commit adds support for leveraging that and
establishing a ssh connection with a public key instead of a password.

[1] http://pexpect.readthedocs.io/en/stable/api/pxssh.html#pexpect.pxssh.pxssh.login
2016-06-12 21:27:41 -07:00