원클릭으로
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.