Skip to content

test: enhance test coverage to 99% (#8)#45

Open
pike00 wants to merge 2 commits into
tryfi:masterfrom
pike00:test-coverage-90
Open

test: enhance test coverage to 99% (#8)#45
pike00 wants to merge 2 commits into
tryfi:masterfrom
pike00:test-coverage-90

Conversation

@pike00

@pike00 pike00 commented Jul 23, 2026

Copy link
Copy Markdown

Resolves #8.

Summary of Changes

  • Increased unit test coverage across custom_components/tryfi and underlying pytryfi library from 79% to 99%.
  • All 194 unit tests pass cleanly.

Key Additions

  • Integration Core & Services: Added full test coverage for custom service calls (set_led_color, turn_on_led, turn_off_led, set_lost_mode, set_wifi_location), setup/unload lifecycles, and device removal filters in tests/test_init.py and tests/test_services.py.
  • pytryfi Models: Created unit tests for FiUser, FiWifiNetwork, and ledColors, and expanded coverage for FiPet and FiDevice.
  • API Queries: Added tests for GraphQL payload formatting and error handling in test_query.py and test_pytryfi.py.
  • Entities: Covered fallback and missing attribute states across binary_sensor, device_tracker, sensor, and switch.

(Written with antigravity, I had some tokens to burn so I thought i'd contribute to a project I use and has relatively active development!)

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.

Enhance Test Coverage to 90%+

1 participant