QA_Bot / test_pipelines.py
Sazzz02's picture
Update test_pipelines.py
a5f24dc verified
raw
history blame contribute delete
535 Bytes
from app import rag_bot
def test_rag_bot():
# Use a sample small PDF (must exist in repo for testing)
sample_pdf = "manual.pdf" # Replace with a small test PDF
question = "What is the purpose of this document?"
try:
answer = rag_bot(question, sample_pdf)
assert isinstance(answer, str)
print("✅ Test Passed: Bot returned an answer")
print("Sample Answer:", answer[:200])
except Exception as e:
print("❌ Test Failed:", e)
if __name__ == "__main__":
test_rag_bot()