test: use PostgreSQL and live model integrations
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy import select, text
|
||||
|
||||
from wisegrade.models import CourseObjective, CourseVersion, GraduationIndicator, RubricCriterion, RubricScoreLevel, RubricVersion, TopicDirection
|
||||
from wisegrade.rules import RubricData, totals
|
||||
from wisegrade.storage import classify, extract_identity, parse_student_folder, secure_path, sha256
|
||||
|
||||
|
||||
def test_postgresql_migrations_and_vector_extension(db):
|
||||
assert db.bind.dialect.name == "postgresql"
|
||||
assert db.scalar(text("SELECT version_num FROM alembic_version")) == "0002"
|
||||
assert db.scalar(text("SELECT extname FROM pg_extension WHERE extname = 'vector'")) == "vector"
|
||||
|
||||
|
||||
def test_seeded_course_and_weights(db):
|
||||
version = db.scalar(select(CourseVersion))
|
||||
rubric = db.scalar(select(RubricVersion))
|
||||
|
||||
Reference in New Issue
Block a user