Skip to content

test(infra): add unit tests for GoogleDriveClient - #71

Merged
ademboukabes merged 1 commit into
developfrom
feat/google-drive-tests
Aug 3, 2026
Merged

test(infra): add unit tests for GoogleDriveClient#71
ademboukabes merged 1 commit into
developfrom
feat/google-drive-tests

Conversation

@ademboukabes

Copy link
Copy Markdown
Collaborator

This PR adds comprehensive unit tests for the GoogleDriveClient (app/infra/google_drive.py).

Key Additions:

  • Mocked HTTP Client: Safely mocked urllib.request.urlopen to test behavior without making real Google API calls.
  • Authentication Flows: Tested OAuth code exchange and user profile fetching (including HTTP error handling).
  • File Operations: Verified file metadata parsing and binary file downloading.
  • Pagination & Filtering: Ensured nextPageToken loops correctly and automatically filters out sub-folders during imports.

This ensures the Google Drive integration is robust and prevents future regressions.

@ademboukabes
ademboukabes merged commit 9a5e091 into develop Aug 3, 2026
2 checks passed
@ademboukabes
ademboukabes deleted the feat/google-drive-tests branch August 3, 2026 16:28
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.

1 participant