Updated community sentiment

This commit is contained in:
2026-02-13 10:54:29 +03:00
parent 834f21bb28
commit 668465aee5
2196 changed files with 1989 additions and 379644 deletions

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
"""Simple test to verify basic functionality"""
import sqlite3
import os
# Clean up any existing database
if os.path.exists('jokes.db'):
os.remove('jokes.db')
print("Cleaned existing database")
# Test importing and initializing
try:
from jokes import initialize_database
print("✓ Successfully imported jokes module")
initialize_database()
print("✓ Database initialized successfully")
# Test database connection
db = sqlite3.connect('jokes.db')
cursor = db.execute("SELECT COUNT(*) FROM jokes")
count = cursor.fetchone()[0]
print(f"✓ Found {count} jokes in database")
# Test user_sentiments table structure
cursor = db.execute("PRAGMA table_info(user_sentiments)")
columns = cursor.fetchall()
print("✓ user_sentiments table columns:")
for col in columns:
print(f" - {col[1]} ({col[2]})")
db.close()
print("✓ All tests passed!")
except Exception as e:
print(f"✗ Error: {e}")