mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Use lists, not dicts, for MagicMock side_effect
Fixes the Python 2.6 test failures on develop
This commit is contained in:
parent
adb50caba1
commit
8b1d3cdeda
@ -138,7 +138,7 @@ class BluezTestCase(TestCase):
|
||||
'''
|
||||
Test of blocking specific bluetooth device
|
||||
'''
|
||||
mock = MagicMock(side_effect={False, True})
|
||||
mock = MagicMock(side_effect=[False, True])
|
||||
with patch.object(salt.utils.validate.net, 'mac', mock):
|
||||
self.assertRaises(CommandExecutionError,
|
||||
bluez.block, "DE:AD:BE:EF:CA:ZE")
|
||||
@ -151,7 +151,7 @@ class BluezTestCase(TestCase):
|
||||
'''
|
||||
Test to unblock specific bluetooth device
|
||||
'''
|
||||
mock = MagicMock(side_effect={False, True})
|
||||
mock = MagicMock(side_effect=[False, True])
|
||||
with patch.object(salt.utils.validate.net, 'mac', mock):
|
||||
self.assertRaises(CommandExecutionError,
|
||||
bluez.block, "DE:AD:BE:EF:CA:ZE")
|
||||
@ -184,7 +184,7 @@ class BluezTestCase(TestCase):
|
||||
'''
|
||||
Test to unpair bluetooth adaptor with a device
|
||||
'''
|
||||
mock = MagicMock(side_effect={False, True})
|
||||
mock = MagicMock(side_effect=[False, True])
|
||||
with patch.object(salt.utils.validate.net, 'mac', mock):
|
||||
self.assertRaises(CommandExecutionError,
|
||||
bluez.unpair, "DE:AD:BE:EF:CA:FE")
|
||||
|
Loading…
Reference in New Issue
Block a user