def test_do_not_detach_slaves_while_changing_options( self, bond_with_slaves): OPTIONS = {'miimon': '110'} bond = bond_with_slaves mock_slaves = bond.del_slaves = bond.add_slaves = mock.Mock() bond.set_options(OPTIONS) mock_slaves.assert_not_called()
def test_do_not_detach_slaves_while_changing_options(self): OPTIONS = {'miimon': '110'} with dummy_devices(2) as (nic1, nic2): with bond_device() as bond: bond.add_slaves((nic1, nic2)) mock_slaves = bond.del_slaves = bond.add_slaves = mock.Mock() bond.set_options(OPTIONS) mock_slaves.assert_not_called()