'Tests get_interface method when interface with both AP and
monitor mode are given as input but the adapter is managed
by NetworkManager'

def test_get_interface_1_ap_monitor_is_managed_by_nm_error(self):

    interface_name = 'wlan0'
    interface_object = 'Card    Object'
    adapter = interfaces.NetworkAdapter(interface_name, interface_object, self.mac_address)
    adapter.has_ap_mode = True
    adapter.has_monitor_mode = True
    adapter.is_managed_by_nm = True
    self.network_manager._name_to_object[interface_name] = adapter
    self.assertRaises(interfaces.InterfaceManagedByNetworkManagerError, self.network_manager.get_interface, True, True)
