Skip to content

Migrate tests to nimax cassettes and update docs#241

Merged
GrandMoff100 merged 1 commit into
devfrom
switch_to_nimax_for_testing
Apr 27, 2026
Merged

Migrate tests to nimax cassettes and update docs#241
GrandMoff100 merged 1 commit into
devfrom
switch_to_nimax_for_testing

Conversation

@adamlogan73
Copy link
Copy Markdown
Collaborator

@adamlogan73 adamlogan73 commented Apr 26, 2026

Summary

  • Replace mock-based HTTP fixtures with nimax per-test cassettes; tests no longer require a running Home Assistant instance
  • Simplify CI: drop Docker Compose, run pytest directly against cassettes
  • Migrate HTTP/async/WebSocket transport from requests/aiohttp/websockets to niquests
  • Update CONTRIBUTING.rst with cassette-based testing workflow and --record instructions
  • Update CHANGELOG.md: niquests migration, nimax, 100% coverage

Test plan

  • uv run pytest passes with 173 tests, 100% coverage
  • uv run ruff check homeassistant_api/ tests/ clean
  • uv run zuban check homeassistant_api/ tests/ clean

- Replace mock-based HTTP fixtures with nimax per-test cassettes
- Add --record mode for capturing cassettes against live HA
- Simplify CI: drop Docker Compose, run pytest directly
- Update CONTRIBUTING.rst: new cassette-based testing workflow
- Update CHANGELOG.md: niquests migration, nimax, 100% coverage
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.74%. Comparing base (60d07a2) to head (e580789).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #241      +/-   ##
==========================================
- Coverage   99.85%   99.74%   -0.11%     
==========================================
  Files          29       29              
  Lines        2787     2790       +3     
==========================================
  Hits         2783     2783              
- Misses          4        7       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GrandMoff100 GrandMoff100 merged commit 1b72830 into dev Apr 27, 2026
6 of 7 checks passed
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