'Test that login is not called without password or pub_key.'

def test_ssh_login_without_password_or_pubkey(self):

    ssh = mock.MagicMock()
    ssh_mock = mock.patch('pexpect.pxssh.pxssh', return_value=ssh)
    ssh_mock.start()
    self.addCleanup(ssh_mock.stop)
    conf_dict = {CONF_PLATFORM: 'asuswrt', CONF_HOST: 'fake_host', CONF_USERNAME: 'fake_user'}
    with self.assertRaises(vol.Invalid):
        conf_dict = PLATFORM_SCHEMA(conf_dict)
    update_mock = mock.patch('homeassistant.components.device_tracker.asuswrt.AsusWrtDeviceScanner.get_asuswrt_data')
    update_mock.start()
    self.addCleanup(update_mock.stop)
    with assert_setup_component(0, DOMAIN):
        assert setup_component(self.hass, DOMAIN, {DOMAIN: conf_dict})
    ssh.login.assert_not_called()
