'Test set_interface_mac with an invalid MAC address to raise an
error'

@mock.patch('wifiphisher.common.interfaces.pyw')
def test_set_interface_mac_invalid_mac_error(self, pyw):

    pyw.macset.side_effect = pyric.error(22, 'Invalid    mac    address')
    interface_name = 'wlan0'
    interface_object = 'Card    Object'
    mac_address = '1'
    adapter = interfaces.NetworkAdapter(interface_name, interface_object, self.mac_address)
    self.network_manager._name_to_object[interface_name] = adapter
    self.network_manager._active.add(interface_name)
    with self.assertRaises(interfaces.InvalidMacAddressError):
        self.network_manager.set_interface_mac(interface_name, mac_address)
