Skip to content

[Feature] Add pytest with mocked Twilio for contributor-friendly testing #29

@sindhugattigoppula

Description

@sindhugattigoppula

Feature Description

current testing requires Twilio credentials and verified numbers, creating barriers for contributors.
Solution:
Add a robust pytest suite that:
Mocks Twilio API responses 100% locally
Validates all OTP flows (success/failure cases)
Integrates with GitHub Actions for auto-testing

Use Case

They clone the repo.
Run pytest -v --cov=app.
The mocked Twilio client instantly simulates both OTP send and verify calls, including success and failure paths.
They see green tests in under 3 seconds — without needing any credentials or internet. They can confidently open a PR knowing it passes the OTP workflow checks.

Contributors can start contributing in <5 minutes without setup headaches.
Maintainers get PRs that are already tested and reliable.
CI/CD pipelines won’t fail if Twilio services are down.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions