mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
tor: tests: Fix issue with pytest 8.x versions
Closes: https://bugs.debian.org/1063968. - Due to a changed behavior in pytest 8.x, any imports with 'setup_module' name will be treated as a method to setup the module in the style of unittest/nose. pytest tries to call this as a method and will fail. - Rename the import to 'setup_module_' instead of 'setup_module' to fix this issue. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
71a10bfd31
commit
37b9e21e30
@ -10,7 +10,7 @@ from django.utils.translation import gettext_noop
|
||||
from plinth import action_utils
|
||||
from plinth import app as app_module
|
||||
from plinth import cfg, kvstore, menu
|
||||
from plinth import setup as setup_module
|
||||
from plinth import setup as setup_module_ # Not setup_module, for pytest
|
||||
from plinth.daemon import (Daemon, app_is_running, diagnose_netcat,
|
||||
diagnose_port_listening)
|
||||
from plinth.modules import torproxy
|
||||
@ -209,7 +209,7 @@ class TorApp(app_module.App):
|
||||
kvstore.set(torproxy.PREINSTALL_CONFIG_KEY, json.dumps(config))
|
||||
# This creates the operation, which will run after the current
|
||||
# operation (Tor setup) is completed.
|
||||
setup_module.run_setup_on_app('torproxy')
|
||||
setup_module_.run_setup_on_app('torproxy')
|
||||
|
||||
if not old_version:
|
||||
logger.info('Enabling Tor app')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user