wip
This commit is contained in:
@@ -129,6 +129,26 @@ class TestVersionDetection:
|
||||
patch('src.utils.constants.ENABLED_FEATURES', ['basic', 'preview', 'text_fitting']):
|
||||
assert has_text_fitting() is True
|
||||
|
||||
def test_has_multiline_text_returns_false_in_free_version(self):
|
||||
"""Multiline text is not available in free version."""
|
||||
from src.utils.constants import has_multiline_text
|
||||
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_multiline_text() is False
|
||||
|
||||
def test_has_multiline_text_returns_true_in_pro_version(self):
|
||||
"""Multiline text is available in PRO version."""
|
||||
from src.utils.constants import has_multiline_text
|
||||
from unittest.mock import patch
|
||||
|
||||
# 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', 'multiline_text']):
|
||||
assert has_multiline_text() is True
|
||||
|
||||
|
||||
|
||||
class TestRuntimeImportDetection:
|
||||
|
||||
Reference in New Issue
Block a user