Skip to content

create python tests using moto for s3 bucket interactions #23

Description

@ThaiTechTales

Summary

Implement unit and integration tests for S3 bucket interactions using the moto library. This allows testing without accessing real AWS infrastructure.

Goals

  • Provide test coverage for S3 logic using mocked AWS services
  • Validate error handling and edge cases
  • Integrate test suite with GitHub Actions CI pipeline

Tasks

  • Set up pytest as the test runner
  • Create unit tests using moto to mock S3 operations (put_object, get_object, etc.)
  • Add test cases for failure scenarios (e.g., non-existent bucket, access denied)
  • Configure test coverage reporting with coverage
  • Add GitHub Actions workflow to run tests and generate reports on pull requests

Notes

  • Use Python 3.12 environment
  • Place tests in the tests/ directory using test_*.py naming
  • Reference: moto documentation

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions