'Test is_managed_by_network_manager function when an
unexpected error happens and checks to see if the
error is raised'

@mock.patch('wifiphisher.common.interfaces.dbus')
def test_is_managed_by_network_manager_unexpected_error_error(self, my_dbus):

    my_dbus.Interface.side_effect = KeyError
    with self.assertRaises(KeyError):
        interfaces.is_managed_by_network_manager('wlan0')
