Test suite foundation by kodjima33 · Pull Request #3 · BasedHardware/omi-github-app · GitHub
Skip to content

Test suite foundation - #3

Draft
kodjima33 wants to merge 1 commit into
mainfrom
cursor-test-1769820069
Draft

Test suite foundation#3
kodjima33 wants to merge 1 commit into
mainfrom
cursor-test-1769820069

Conversation

@kodjima33

Copy link
Copy Markdown
Contributor

Add basic tests and fix a bug with OpenAI client initialization.

The OpenAI client in issue_detector.py previously initialized at import time, causing crashes if the OPENAI_API_KEY environment variable was not set. This change implements lazy initialization, ensuring the client is only created when needed and preventing application crashes in environments without an API key configured.


Open in Cursor Open in Web

- Create test_app.py with basic endpoint tests
- Add pytest to requirements.txt
- Fix issue_detector.py to lazily initialize OpenAI client
- All tests passing

Co-authored-by: kodjima33 <kodjima33@gmail.com>
@cursor

cursor Bot commented Jan 31, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants