mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-11 10:12: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
|
||||
psk_agent = PSKAgent("")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
||||
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||
wd.unregister_psk_agent(psk_agent)
|
||||
|
||||
# 7 chars
|
||||
psk_agent = PSKAgent("a" * 7)
|
||||
wd.register_psk_agent(psk_agent)
|
||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
||||
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||
wd.unregister_psk_agent(psk_agent)
|
||||
|
||||
# 64 chars
|
||||
psk_agent = PSKAgent("a" * 64)
|
||||
wd.register_psk_agent(psk_agent)
|
||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
||||
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||
wd.unregister_psk_agent(psk_agent)
|
||||
|
||||
# 64k chars
|
||||
psk_agent = PSKAgent("a" * 65536)
|
||||
wd.register_psk_agent(psk_agent)
|
||||
self.assertRaises(iwd.NotSupportedEx, network.connect)
|
||||
self.assertRaises(iwd.InvalidFormatEx, network.connect)
|
||||
wd.unregister_psk_agent(psk_agent)
|
||||
|
||||
del wd
|
||||
|
@ -48,6 +48,7 @@ class FailedEx(dbus.DBusException): pass
|
||||
class AbortedEx(dbus.DBusException): pass
|
||||
class NotAvailableEx(dbus.DBusException): pass
|
||||
class InvalidArgsEx(dbus.DBusException): pass
|
||||
class InvalidFormatEx(dbus.DBusException): pass
|
||||
class AlreadyExistsEx(dbus.DBusException): pass
|
||||
class NotFoundEx(dbus.DBusException): pass
|
||||
class NotSupportedEx(dbus.DBusException): pass
|
||||
@ -69,6 +70,7 @@ _dbus_ex_to_py = {
|
||||
'Aborted' : AbortedEx,
|
||||
'NotAvailable' : NotAvailableEx,
|
||||
'InvalidArgs' : InvalidArgsEx,
|
||||
'InvalidFormat' : InvalidFormatEx,
|
||||
'AlreadyExists' : AlreadyExistsEx,
|
||||
'NotFound' : NotFoundEx,
|
||||
'NotSupported' : NotSupportedEx,
|
||||
|
Loading…
Reference in New Issue
Block a user