Skip to content

Add pytest test suite (26 tests) and tests CI workflow#23

Merged
DaLuSt merged 1 commit intomainfrom
claude/add-tests-7Wp79
Feb 21, 2026
Merged

Add pytest test suite (26 tests) and tests CI workflow#23
DaLuSt merged 1 commit intomainfrom
claude/add-tests-7Wp79

Conversation

@DaLuSt
Copy link
Copy Markdown
Owner

@DaLuSt DaLuSt commented Feb 21, 2026

Summary

  • 26 pytest tests across three files — all pass in the current codebase
  • CI workflow runs the suite on every push and on PRs to main
  • Google auth libraries are stubbed in conftest.py so tests run offline
File Tests What is covered
test_weekly_cleanup.py 11 _should_delete (boundary conditions), _load_credentials (env, file, missing, partial)
test_drive_upload.py 5 maybe_upload_logs skip logic, exception handling, successful call
test_web_app.py 10 / index, /logout, /dashboard auth guard, /api/items 401 + data, /api/delete 401 + success

Test plan

  • Confirm the new tests workflow passes on this PR
  • Introduce a deliberate bug in _should_delete and confirm a test catches it

https://claude.ai/code/session_014HLhrFtCVRFnEyfRexiy3d

26 tests across three files:

  tests/test_weekly_cleanup.py  — _should_delete (7) and _load_credentials (4)
  tests/test_drive_upload.py    — maybe_upload_logs skip/call behaviour (5)
  tests/test_web_app.py         — Flask routes: auth guards, session, delete (10)

Also adds:
  pytest.ini                    — test discovery config
  tests/requirements.txt        — pytest, pytest-mock, flask, praw
  tests/conftest.py             — stubs google-auth for offline testing
  .github/workflows/tests.yml   — runs pytest on every push and PR to main

https://claude.ai/code/session_014HLhrFtCVRFnEyfRexiy3d
@DaLuSt DaLuSt merged commit e967a21 into main Feb 21, 2026
2 of 4 checks passed
@DaLuSt DaLuSt deleted the claude/add-tests-7Wp79 branch February 27, 2026 09:58
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