AllDotPy / AllDotPy/EasySwitch
🧪 [Testing] Add Comprehensive Unit Tests for Base HTTP Client
Open
@Roshansingh9 is already working on this.
Since Oct 5, 2025.
enhancement
good first issue
Hactoberfest
testing
- Dominant language
- Python
- Stars
- 21
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Description:
🚀 Overview
We need to build a robust test suite for our HTTPClient class in easyswitch/utils/http.py to ensure reliability across all mobile money API integrations.
*📋 Test Coverage Requirements
Core Functionality
- Initialization with different configurations
- Request methods (GET, POST, PUT, DELETE, PATCH)
- Header management and merging
- Timeout handling and retry mechanisms
- Error handling for network issues
Specific Scenarios
- File uploads with multipart/form-data
- JSON payload serialization
- Query parameters encoding
- Proxy configuration support
- Session management with context managers
Error Conditions
- HTTP error responses (4xx, 5xx)
- Network timeouts
- JSON parsing errors
- Rate limiting (429 responses)
- SSL/TLS certificate issues
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.