PMUC-POC / integration_test.py
sh0kul's picture
Upload 2 files
548b1a1 verified
raw
history blame contribute delete
868 Bytes
import os
import pytest
from app import evaluate_trl
from dotenv import load_dotenv
load_dotenv()
GEMINI_API_KEY = os.getenv("GEMINI_API_KEY")
@pytest.mark.skipif(not GEMINI_API_KEY, reason="No GEMINI_API_KEY set, skipping integration test")
def test_evaluate_trl_integration():
proposal_text = """
This proposal describes a laboratory prototype of a new sensor technology
with proof of concept demonstrated through simulation and lab testing.
"""
trl, reasoning = evaluate_trl(proposal_text)
assert trl is not None, "TRL should not be None"
assert isinstance(trl, int), "TRL should be an integer"
assert 1 <= trl <= 9, "TRL should be between 1 and 9"
assert reasoning is not None and len(reasoning) > 0, "Reasoning should not be empty"
print(f"Integration Test Result - TRL: {trl}")
print(f"Reasoning: {reasoning}")