Skip to content

Integration tests#29

Merged
brouberol merged 2 commits into
brouberol:mainfrom
gehel:integration-tests
Mar 27, 2026
Merged

Integration tests#29
brouberol merged 2 commits into
brouberol:mainfrom
gehel:integration-tests

Conversation

@gehel

@gehel gehel commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
  • Add infrastructure to capture HTTP responses from Phabricator and use them as fixtures.
  • Add an integration test for the show command.

@gehel gehel force-pushed the integration-tests branch from 6198a71 to 251487f Compare March 27, 2026 16:34
…ixtures

Introduce a pattern for capturing real Phabricator HTTP responses and using
them as fixtures in mocked integration tests:

- Add capture_response() and save_fixture() helpers to exploratory_test.py so
  that each fixture-capture test is a concise 3-line call against the live API
- Add five capture tests for the 'show' command (show_task, show_user,
  show_projects, find_subtasks, find_parent_task) targeting T417698
- Add phable/tests/cli/ package with a conftest.py that clears the in-memory
  cache before each test (preventing @cached methods from suppressing mocks)
  and provides a load_fixture() helper that skips tests when fixtures have not
  yet been captured

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gehel gehel force-pushed the integration-tests branch from 251487f to 80c3d0e Compare March 27, 2026 17:07
Tests invoke the full stack (CliRunner → PhabricatorClient → mocked HTTP)
using fixtures captured from the live Phabricator API via the exploratory
tests added in the previous commit.

Covers plain and oneline output formats, asserting on task ID, title,
author username, and status in the rendered output.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gehel gehel force-pushed the integration-tests branch from 80c3d0e to ee7e4da Compare March 27, 2026 17:11
@brouberol brouberol merged commit 48bbcd9 into brouberol:main Mar 27, 2026
4 checks passed
@brouberol

Copy link
Copy Markdown
Owner

Thank you!

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