mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
24 lines
583 B
Python
24 lines
583 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
pytest configuration for all tests in the freedombox/tests/ directory.
|
|
"""
|
|
|
|
import pathlib
|
|
from unittest.mock import patch
|
|
|
|
import pytest
|
|
|
|
from freedombox import cfg
|
|
|
|
|
|
@pytest.fixture(name='shortcuts_file')
|
|
def fixture_shortcuts_file():
|
|
with patch('freedombox.frontpage.get_custom_shortcuts_paths') as func:
|
|
|
|
def setter(file_name):
|
|
path = pathlib.Path(__file__).parent / 'data' / 'shortcuts'
|
|
path /= file_name
|
|
func.return_value = cfg.expand_to_dot_d_paths([path])
|
|
|
|
yield setter
|