Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pmateusz committed Dec 29, 2024
1 parent cf59d4e commit 30e95ea
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
8 changes: 5 additions & 3 deletions tests/client/aiohttp/test_array_query_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async def test_handles_array_query_params(http_server: HTTPTestServer) -> None:
# GIVEN
http_server.handler = companies_filter_by_sector

@dataclass(slots=True)
@dataclass
class Company:
name: str
sector: str
Expand All @@ -31,5 +31,7 @@ async def get_companies(
companies = await client.get_companies(sectors=["Information Technology", "Financials"])

# THEN
assert len(companies) > 0
assert all(company.sector in ["Information Technology", "Financials"] for company in companies)
assert companies == [
Company(name="Apple", sector="Information Technology"),
Company(name="Berkshire Hathaway", sector="Financials"),
]
8 changes: 5 additions & 3 deletions tests/client/httpx/test_array_query_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_handles_array_query_params(http_server: HTTPTestServer) -> None:
# GIVEN
http_server.handler = companies_filter_by_sector

@dataclass(slots=True)
@dataclass
class Company:
name: str
sector: str
Expand All @@ -29,5 +29,7 @@ def get_companies(
companies = client.get_companies(sectors=["Information Technology", "Financials"])

# THEN
assert len(companies) > 0
assert all(company.sector in ["Information Technology", "Financials"] for company in companies)
assert companies == [
Company(name="Apple", sector="Information Technology"),
Company(name="Berkshire Hathaway", sector="Financials"),
]
8 changes: 5 additions & 3 deletions tests/client/requests/test_array_query_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def test_send_array_query_params(http_server: HTTPTestServer) -> None:
# GIVEN
http_server.handler = companies_filter_by_sector

@dataclass(slots=True)
@dataclass
class Company:
name: str
sector: str
Expand All @@ -29,5 +29,7 @@ def get_companies(
companies = client.get_companies(sectors=["Information Technology", "Financials"])

# THEN
assert len(companies) > 0
assert all(company.sector in ["Information Technology", "Financials"] for company in companies)
assert companies == [
Company(name="Apple", sector="Information Technology"),
Company(name="Berkshire Hathaway", sector="Financials"),
]

0 comments on commit 30e95ea

Please sign in to comment.