Add tests for CLI entry point and scoring functionality; enhance service layer tests for similar units
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""Tests for the __main__.py entry point."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from finn_eiendom.__main__ import app # noqa: F401
|
||||
|
||||
|
||||
def test_main_entry_point():
|
||||
"""Test that __main__.py can be imported and has the app entry point."""
|
||||
from finn_eiendom.__main__ import app
|
||||
|
||||
assert app is not None
|
||||
|
||||
|
||||
def test_main_via_module():
|
||||
"""Test that the module can be run with python -m finn_eiendom."""
|
||||
# This tests that __main__.py correctly invokes the CLI app
|
||||
with patch("finn_eiendom.cli.app") as mock_app:
|
||||
# Simulate running via __main__
|
||||
import finn_eiendom.__main__
|
||||
|
||||
# The module should have imported app from cli
|
||||
assert finn_eiendom.__main__.app is not None
|
||||
Reference in New Issue
Block a user