test: add pytest-mock, introduce fixtures & type hints (#290)

* Added pytest-mock to dev dependencies and pre-commit hooks
* Introduced InvalidGitHubTokenError for clearer token-validation failures
* Refactored tests:
  * Replaced ad-hoc mocks with reusable fixtures
  * Parametrised URL/branch matrices to cut duplication
  * Added type hints throughout
* New coverage:
  * validate_github_token (happy & error paths)
  * create_git_command / create_git_auth_header
This commit is contained in:
Filip Christiansen 2025-06-21 21:26:29 +02:00 committed by GitHub
parent 3869aa32e3
commit 95009bdf15
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 578 additions and 461 deletions

View file

@ -99,6 +99,7 @@ repos:
"fastapi[standard]>=0.109.1",
pydantic,
pytest-asyncio,
pytest-mock,
python-dotenv,
slowapi,
starlette>=0.40.0,
@ -117,6 +118,7 @@ repos:
"fastapi[standard]>=0.109.1",
pydantic,
pytest-asyncio,
pytest-mock,
python-dotenv,
slowapi,
starlette>=0.40.0,