'Tests get_interface method when interface with specified mode
can\'t be found'

def test_get_interface_no_ap_available_error(self):

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