ワンクリックで
test-integration
Guide and instructions on how to run tests, set up test environments, and mock HTTP layers in the ha-gasbuddy repository.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guide and instructions on how to run tests, set up test environments, and mock HTTP layers in the ha-gasbuddy repository.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Guide and instructions on how coding agents should format code, commit changes, run pre-commit checks, push branches, and create pull requests using the project templates.
Overview of the Virtual Hub design pattern used to manage shared settings centrally across multiple GasBuddy station configurations.
SOC 職業分類に基づく
| name | test_integration |
| description | Guide and instructions on how to run tests, set up test environments, and mock HTTP layers in the ha-gasbuddy repository. |
This guide helps AI agents run and add tests in this repository.
Ensure you are using the correct Python version (target is 3.14) and dependencies:
# Setup virtual environment
uv venv --python 3.14
uv pip install -r requirements_test.txt
uv pip install 'ruff==0.15.14'
# Run the test suite
.venv/bin/python -m pytest -q --no-header
Add new test cases to tests/. Identify the target area to add tests:
test_config_flow.py: Form steps, reconfigurations, and options validation.test_init.py: Component setup, uninstallation, migration logic, and background services.test_sensor.py: Price state assertions, unit of measure changes, and device attribute assertions.aioresponses to mock the GraphQL endpoints (https://www.gasbuddy.com/graphql) and the web client page (https://www.gasbuddy.com/home).price_lookup on py_gasbuddy.GasBuddy by directly calling process_request in code, as this breaks existing HTTP-level mocks. Patch at the public method level or configure appropriate mock responses.