Skip to content

Parametrize HttpClient implementations tests to remove code duplication #1292

Closed

Description

@Pijukatel

Currently, there are 3 different implementations of HttpClient. All of them have their own test file with duplicated test cases. Refactor the same tests to accept HttpClient (or some factory method) as test parameter to achieve something like this:

@pytest.mark.parametrize("http_client", [
  ImpitHttpClient(),
  CurlImpersonateHttpClient(),
  HttpxHttpClient(),
])
def some_http_client_test(http_client: HttpClient):
    ...

Activity

  1. added
    t-toolingIssues with this label are in the ownership of the tooling team.
    debtCode quality improvement or decrease of technical debt.
    on Jul 8, 2025
  2. self-assigned this
    on Jul 11, 2025
  3. added a commit that references this issue on Jul 15, 2025
    47380ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

debtCode quality improvement or decrease of technical debt.t-toolingIssues with this label are in the ownership of the tooling team.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions