-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest_couchdb_components.py
More file actions
44 lines (36 loc) · 1.4 KB
/
Copy pathtest_couchdb_components.py
File metadata and controls
44 lines (36 loc) · 1.4 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
"""
Test CouchDB to MySQL Migration
Simple test to verify all components work together
"""
try:
from couchdb_converter.sample_couchdb_data import CouchDBSampleDataGenerator
from couchdb_converter.couchdb_schema_analyzer import CouchDBSchemaAnalyzer
from couchdb_converter.couchdb2mysql import CouchDBToMySQLConverter
print("✅ All CouchDB modules imported successfully!")
# Test basic functionality
print("\n🔧 Testing CouchDB components...")
# Test analyzer initialization
analyzer = CouchDBSchemaAnalyzer()
print("✅ CouchDB Schema Analyzer created")
# Test converter initialization
mysql_config = {
'host': 'localhost',
'user': 'root',
'password': 'test',
'database': 'test_db'
}
converter = CouchDBToMySQLConverter(mysql_config)
print("✅ CouchDB to MySQL Converter created")
# Test sample data generator
generator = CouchDBSampleDataGenerator()
print("✅ Sample Data Generator created")
print("\n🎉 All CouchDB components are working correctly!")
print("You can now use the GUI with CouchDB support.")
except ImportError as e:
print(f"❌ Import error: {e}")
print("Please check that all required dependencies are installed:")
print(" pip install couchdb mysql-connector-python")
except Exception as e:
print(f"❌ Error: {e}")
if __name__ == "__main__":
pass