AllDotPy / AllDotPy/EasySwitch

🧪 [Testing] Add Comprehensive Unit Tests for Base HTTP Client

Open
#31 2 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.