Skip to content

test(connectors): add unit tests for Google Drive source connector#1985

Open
nuthalapativarun wants to merge 1 commit into
cocoindex-io:mainfrom
nuthalapativarun:test/google-drive-connector
Open

test(connectors): add unit tests for Google Drive source connector#1985
nuthalapativarun wants to merge 1 commit into
cocoindex-io:mainfrom
nuthalapativarun:test/google-drive-connector

Conversation

@nuthalapativarun
Copy link
Copy Markdown
Contributor

Summary

  • Add unit tests for _parse_modified_time(): valid UTC string, None, empty string, offset-aware ISO timestamp, and millisecond-precision timestamps
  • Add unit tests for DriveFilePath: resolve() returns file ID, path preservation, _with_path() preserves file ID and type, equality by path
  • Tests follow the same pattern as test_turbopuffer_target.py — no live service required, live tests gated on GOOGLE_DRIVE_CREDENTIALS env var

Test plan

  • uv run pytest python/tests/connectors/test_google_drive_source.py -v — 11 passed
  • uv tool run ruff format --check python/tests/connectors/test_google_drive_source.py — already formatted
  • uv tool run ruff check python/tests/connectors/test_google_drive_source.py — all checks passed

Add unit tests for _parse_modified_time() and DriveFilePath helper
classes that run without a live Google Drive service. Live tests are
gated on the GOOGLE_DRIVE_CREDENTIALS env var and skipped when absent.
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