Describe the solution you'd like
Implement unit tests and extra validators for the PaymentInfo pydantic model. The data model, which is used to process card payments, currently only checks for correct card number and cvv character count, and is not covered by any unit tests. I want to implement a model validator that checks for expired cards - so we don't call payment processor APIs with expired cards - and write unit tests for the model.
Acceptance Criteria
- Model rejects expired cards and rasises an error
- Unit tests cover all field and model validators
Testing Requirements
Unit Tests:
- Write and run unit tests to validate input data.
Integration Tests:
- Ensure end-to-end functionality is tested with integration tests.