Skip to content

Parametrize HttpClient implementations tests to remove code duplication #1292

@Pijukatel

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):
    ...

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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy