mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-11 18:22:42 +01:00
autotests: Update expected error in password length test
This commit is contained in:
parent
47bb5b5f72
commit
d558724676
@ -42,25 +42,25 @@ class Test(unittest.TestCase):
|
|||||||
# 0 chars
|
# 0 chars
|
||||||
psk_agent = PSKAgent("")
|
psk_agent = PSKAgent("")
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||||
wd.unregister_psk_agent(psk_agent)
|
wd.unregister_psk_agent(psk_agent)
|
||||||
|
|
||||||
# 7 chars
|
# 7 chars
|
||||||
psk_agent = PSKAgent("a" * 7)
|
psk_agent = PSKAgent("a" * 7)
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||||
wd.unregister_psk_agent(psk_agent)
|
wd.unregister_psk_agent(psk_agent)
|
||||||
|
|
||||||
# 64 chars
|
# 64 chars
|
||||||
psk_agent = PSKAgent("a" * 64)
|
psk_agent = PSKAgent("a" * 64)
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||||
wd.unregister_psk_agent(psk_agent)
|
wd.unregister_psk_agent(psk_agent)
|
||||||
|
|
||||||
# 64k chars
|
# 64k chars
|
||||||
psk_agent = PSKAgent("a" * 65536)
|
psk_agent = PSKAgent("a" * 65536)
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||||
wd.unregister_psk_agent(psk_agent)
|
wd.unregister_psk_agent(psk_agent)
|
||||||
|
|
||||||
del wd
|
del wd
|
||||||
|
@ -48,6 +48,7 @@ class FailedEx(dbus.DBusException): pass
|
|||||||
class AbortedEx(dbus.DBusException): pass
|
class AbortedEx(dbus.DBusException): pass
|
||||||
class NotAvailableEx(dbus.DBusException): pass
|
class NotAvailableEx(dbus.DBusException): pass
|
||||||
class InvalidArgsEx(dbus.DBusException): pass
|
class InvalidArgsEx(dbus.DBusException): pass
|
||||||
|
class InvalidFormatEx(dbus.DBusException): pass
|
||||||
class AlreadyExistsEx(dbus.DBusException): pass
|
class AlreadyExistsEx(dbus.DBusException): pass
|
||||||
class NotFoundEx(dbus.DBusException): pass
|
class NotFoundEx(dbus.DBusException): pass
|
||||||
class NotSupportedEx(dbus.DBusException): pass
|
class NotSupportedEx(dbus.DBusException): pass
|
||||||
@ -69,6 +70,7 @@ _dbus_ex_to_py = {
|
|||||||
'Aborted' : AbortedEx,
|
'Aborted' : AbortedEx,
|
||||||
'NotAvailable' : NotAvailableEx,
|
'NotAvailable' : NotAvailableEx,
|
||||||
'InvalidArgs' : InvalidArgsEx,
|
'InvalidArgs' : InvalidArgsEx,
|
||||||
|
'InvalidFormat' : InvalidFormatEx,
|
||||||
'AlreadyExists' : AlreadyExistsEx,
|
'AlreadyExists' : AlreadyExistsEx,
|
||||||
'NotFound' : NotFoundEx,
|
'NotFound' : NotFoundEx,
|
||||||
'NotSupported' : NotSupportedEx,
|
'NotSupported' : NotSupportedEx,
|
||||||
|
Loading…
Reference in New Issue
Block a user