'Test get_interface method get the correct interface when 1
card is managed and the other card is unmanaged by NetworkManager'

def test_get_interface_2_ap_monitor_is_managed_by_nm_1_ap_mon_interface(self):

    interface_name_0 = 'wlan0'
    interface_name_1 = 'wlan1'
    interface_object = 'Card    Object'
    adapter_0 = interfaces.NetworkAdapter(interface_name_0, interface_object, self.mac_address)
    adapter_1 = interfaces.NetworkAdapter(interface_name_1, interface_object, self.mac_address)
    self.network_manager._name_to_object[interface_name_0] = adapter_0
    self.network_manager._name_to_object[interface_name_1] = adapter_1
    adapter_0.has_monitor_mode = True
    adapter_1.has_monitor_mode = True
    adapter_0.has_ap_mode = True
    adapter_1.has_ap_mode = True
    adapter_0.is_managed_by_nm = True
    adapter_1.is_managed_by_nm = False
    expected = interface_name_1
    actual = self.network_manager.get_interface(True, True)
    self.assertEqual(expected, actual)
