-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_import_settings.py
More file actions
59 lines (46 loc) · 2.09 KB
/
Copy pathtest_import_settings.py
File metadata and controls
59 lines (46 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env python3
"""
Test script to verify import settings are working correctly
"""
import sys
import os
# Add the src directory to the Python path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from src.database_storage import database_storage
def test_import_settings():
"""Test that import settings are being read correctly"""
print("Testing Import Settings...")
print("=" * 50)
# Get all import settings
settings = database_storage.get_import_settings()
print("All import settings:")
for key, value in sorted(settings.items()):
print(f" {key}: {value}")
print("\n" + "=" * 50)
print("Testing video processing settings logic:")
# Test the same logic used in video processing
import_settings = database_storage.get_import_settings()
enable_transcript_extraction = import_settings.get('enableTranscriptExtraction', import_settings.get('enable_transcript_extraction', True))
enable_auto_summary = import_settings.get('enableAutoSummary', import_settings.get('enable_auto_summary', True))
enable_chapter_extraction = import_settings.get('enableChapterExtraction', import_settings.get('enable_chapter_extraction', True))
print(f"enable_transcript_extraction: {enable_transcript_extraction}")
print(f"enable_auto_summary: {enable_auto_summary}")
print(f"enable_chapter_extraction: {enable_chapter_extraction}")
print("\n" + "=" * 50)
print("Expected behavior:")
if not enable_transcript_extraction:
print("✓ Transcript extraction should be SKIPPED")
else:
print("✗ Transcript extraction should be ENABLED")
if not enable_auto_summary:
print("✓ Auto summary generation should be SKIPPED")
else:
print("✗ Auto summary generation should be ENABLED")
if not enable_chapter_extraction:
print("✓ Chapter extraction should be SKIPPED")
else:
print("✗ Chapter extraction should be ENABLED")
print("\n" + "=" * 50)
print("Test completed!")
if __name__ == "__main__":
test_import_settings()