help: tests: Run tests using doc in current dir instead of /usr

- This prevents the test from failing if install has not run yet.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2024-01-30 10:25:41 -08:00 committed by James Valleroy
parent 721984c0e0
commit 8202b734a6
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -19,7 +19,7 @@ from django import urls
from django.conf import settings
from django.http import Http404
from plinth import module_loader
from plinth import cfg, module_loader
from plinth.modules.help import views
# For all tests, use plinth.urls instead of urls configured for testing
@ -42,6 +42,12 @@ def fixture_app_urls():
yield
@pytest.fixture(autouse=True, scope='module')
def fixture_developer_configuration():
"""Make sure docs are read from current directory instead of /usr."""
cfg.read_file(cfg.get_develop_config_path())
@pytest.mark.parametrize("view_name, view", (
('feedback', views.feedback),
('support', views.support),