You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
588 B
11 lines
588 B
import pytest
|
|
from src.models import UnifiedEvent, PersonAnalysisRecord, SessionSummary, LogConsistencyIssue
|
|
|
|
def test_models_and_validation() -> None:
|
|
event=UnifiedEvent("e","s","id","tracking","created",1,1,"t",0.,metadata={"日本語":True})
|
|
assert event.metadata["日本語"]
|
|
assert PersonAnalysisRecord("e","s",1).prompt_condition=="unknown"
|
|
assert SessionSummary("e","s","t").total_tracks==0
|
|
assert LogConsistencyIssue("unknown","warning",None,None,"m").severity=="warning"
|
|
with pytest.raises(ValueError): UnifiedEvent("e","s","id","bad","x",None,0,"t",0.)
|
|
|
|
|