text fitting pro feature
This commit is contained in:
@@ -114,6 +114,21 @@ class TestVersionDetection:
|
||||
assert limits["max_concurrent_operations"] == 1, \
|
||||
f"Expected free version max_concurrent_operations=1, got {limits['max_concurrent_operations']}"
|
||||
|
||||
def test_has_text_fitting_returns_correct_value_per_version(self):
|
||||
"""Test that has_text_fitting() returns correct value based on VERSION_TYPE."""
|
||||
from src.utils.constants import has_text_fitting
|
||||
from unittest.mock import patch
|
||||
|
||||
# Test free version - need to patch ENABLED_FEATURES since it's computed at import
|
||||
with patch('src.utils.constants.VERSION_TYPE', 'free'), \
|
||||
patch('src.utils.constants.ENABLED_FEATURES', ['basic', 'preview']):
|
||||
assert has_text_fitting() is False
|
||||
|
||||
# Test full version - need to patch ENABLED_FEATURES since it's computed at import
|
||||
with patch('src.utils.constants.VERSION_TYPE', 'full'), \
|
||||
patch('src.utils.constants.ENABLED_FEATURES', ['basic', 'preview', 'text_fitting']):
|
||||
assert has_text_fitting() is True
|
||||
|
||||
|
||||
|
||||
class TestRuntimeImportDetection:
|
||||
|
||||
Reference in New Issue
Block a user