26 lines
755 B
Python
26 lines
755 B
Python
#!/usr/bin/env python3
|
|
"""Test script for the helper functions."""
|
|
|
|
from app.app import create_app
|
|
|
|
|
|
def test_helper_functions():
|
|
app = create_app()
|
|
with app.app_context():
|
|
from app.app import _load_script_description, _save_script_description
|
|
|
|
# Test save and load
|
|
test_content = "# Test Description\nThis is a test markdown content."
|
|
result = _save_script_description("test_desc.md", test_content, "es")
|
|
print(f"Save result: {result}")
|
|
|
|
# Test load
|
|
loaded = _load_script_description("test_desc.md", "es")
|
|
print(f"Loaded content: {loaded[:50]}...")
|
|
|
|
print("Helper functions work correctly!")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
test_helper_functions()
|