'Tests is_interface_valid when the adapter is internet mode'

def test_is_interface_valid_mode_internet_is_managed_by_nm_true(self):

    interface_name = 'wlan0'
    self.network_manager = interfaces.NetworkManager()
    adapter = interfaces.NetworkAdapter(interface_name, 'CARD', '00:00:00:00:00:00')
    adapter.is_managed_by_nm = True
    self.network_manager._name_to_object[interface_name] = adapter
    actual = self.network_manager.is_interface_valid(interface_name, 'internet')
    message = 'Failed    to    validate    an    interface    with    internet    mode'
    self.assertTrue(actual, message)
