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>
16 lines
457 B
Python
16 lines
457 B
Python
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
"""
|
|
Test module for module loading mechanism.
|
|
"""
|
|
|
|
from unittest.mock import mock_open, patch
|
|
|
|
from freedombox import module_loader
|
|
|
|
|
|
@patch('pathlib.Path.open', mock_open(read_data='freedombox.modules.apache\n'))
|
|
def test_get_module_import_path():
|
|
"""Returning the module import path."""
|
|
import_path = module_loader.get_module_import_path('apache')
|
|
assert import_path == 'freedombox.modules.apache'
|