Skip to content

Add integration tests for real TP-Link Cloud API#111

Merged
piekstra merged 1 commit intomainfrom
piekstra/98-integration-tests
Feb 8, 2026
Merged

Add integration tests for real TP-Link Cloud API#111
piekstra merged 1 commit intomainfrom
piekstra/98-integration-tests

Conversation

@piekstra
Copy link
Owner

@piekstra piekstra commented Feb 8, 2026

Summary

  • Add tests/test_integration.py with 6 tests covering V2 login, token management, device listing, sys_info retrieval, and device lookup
  • All tests are gated behind TPLINK_INTEGRATION_TEST=1 — they are automatically skipped in CI and in normal local test runs
  • Verified: 81 wiremock tests pass + 6 integration tests skipped by default, all 6 pass with real credentials

Running integration tests locally

TPLINK_INTEGRATION_TEST=1 \
TPLINK_KASA_USERNAME=your@email.com \
TPLINK_KASA_PASSWORD=$'your_password' \
pytest tests/test_integration.py --verbose

Note: Use $'...' quoting if your password contains special characters like !.

Closes #98

Add test_integration.py with tests for V2 login, token management,
device listing, sys_info retrieval, and device lookup. Gated behind
TPLINK_INTEGRATION_TEST=1 env var — never runs in CI.

[#98]
@piekstra piekstra merged commit 2b5e725 into main Feb 8, 2026
5 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.

Add integration tests with real API

1 participant