Skip to content

Commit

Permalink
Get tests to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
bmquinn committed Jan 18, 2024
1 parent 6430d3c commit 7da4197
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ test-node:
cd node && npm run test
deps-python:
cd chat/src && pip install -r requirements.txt
cover-python:
cd chat/src && coverage run --include='src/**/*' -m unittest -v && coverage report
cover-python: deps-python
cd chat && coverage run -m unittest -v && coverage report
style-python:
cd chat && ruff check .
test-python:
Expand Down
1 change: 1 addition & 0 deletions chat/src/event_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __post_init__(self):
self.azure_resource_name = self.payload.get(
"azure_resource_name", os.environ.get("AZURE_OPENAI_RESOURCE_NAME")
)
print(f"azure_resource_name: {self.azure_resource_name}")
if not self.azure_resource_name:
raise EnvironmentError(
"Either payload must contain 'azure_resource_name' or environment variable 'AZURE_OPENAI_RESOURCE_NAME' must be set"
Expand Down
15 changes: 0 additions & 15 deletions chat/test/handlers/test_chat.py

This file was deleted.

1 change: 1 addition & 0 deletions chat/test/test_event_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_requires_an_azure_resource(self):
)
class TestEventConfig(TestCase):
def test_fetches_attributes_from_vector_database(self):
os.environ.pop("AZURE_OPENAI_RESOURCE_NAME", None)
with self.assertRaises(EnvironmentError):
EventConfig()

Expand Down

0 comments on commit 7da4197

Please sign in to comment.