From: Jouni Malinen Date: Sun, 15 Nov 2015 17:08:05 +0000 (+0200) Subject: tests: D-Bus SaveConfig X-Git-Tag: hostap_2_6~1397 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2299b543832b8934a4c2b35561d91afebb9e7040;p=thirdparty%2Fhostap.git tests: D-Bus SaveConfig Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 718d17134..9db645fde 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -4971,3 +4971,14 @@ def test_dbus_expectdisconnect(dev, apdev): wpas.ExpectDisconnect() dev[0].request("DISCONNECT") dev[0].wait_disconnected() + +def test_dbus_save_config(dev, apdev): + """D-Bus SaveConfig""" + (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0]) + iface = dbus.Interface(if_obj, WPAS_DBUS_IFACE) + try: + iface.SaveConfig() + raise Exception("SaveConfig() accepted unexpectedly") + except dbus.exceptions.DBusException, e: + if not str(e).startswith("fi.w1.wpa_supplicant1.UnknownError: Not allowed to update configuration"): + raise Exception("Unexpected error message for SaveConfig(): " + str(e))