diff --git a/libervia/backend/plugins/plugin_misc_nat_port.py b/libervia/backend/plugins/plugin_misc_nat_port.py index 97915e51..e3a5f79a 100644 --- a/libervia/backend/plugins/plugin_misc_nat_port.py +++ b/libervia/backend/plugins/plugin_misc_nat_port.py @@ -17,6 +17,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import sys from libervia.backend.core.i18n import _ from libervia.backend.core.constants import Const as C from libervia.backend.core.log import getLogger @@ -28,6 +29,11 @@ from twisted.internet import defer from twisted.python import failure import threading + +if "pytest" in sys.modules: + # We skip this module during tests to avoid waiting for UPnP-IGD. + raise exceptions.CancelError("This module is not run during tests.") + try: import miniupnpc except ImportError: @@ -46,7 +52,7 @@ PLUGIN_INFO = { } STARTING_PORT = 6000 # starting point to automatically find a port -DEFAULT_DESC = "SaT port mapping" # we don't use "à" here as some bugged NAT don't manage charset correctly +DEFAULT_DESC = "Libervia port mapping" class MappingError(Exception):