Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
cache: pip

- name: Install dependencies
run: python -m pip install -r requirements.txt
run: python -m pip install -r requirements-dev.txt

- name: Check Python syntax
run: python -m compileall app
Expand All @@ -33,3 +33,6 @@ jobs:

- name: Check dependency consistency
run: python -m pip check

- name: Run tests
run: python -m pytest -q
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r requirements.txt
pytest>=8,<9
21 changes: 21 additions & 0 deletions tests/test_ai_context.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from app.services.ai_context import (
question_is_in_scope,
question_needs_conditions,
)


def test_natural_recommendation_question_is_in_scope() -> None:
question = "What is the best location to film at this evening?"

assert question_is_in_scope(question)
assert question_needs_conditions(question)


def test_new_location_recommendation_is_in_scope() -> None:
question = "What location would you recommend adding?"

assert question_is_in_scope(question)


def test_unrelated_question_is_rejected() -> None:
assert not question_is_in_scope("Tell me a joke")
Loading