Skip to content

Commit 647d49d

Browse files
committed
Review fix
- import, removed 400 test
1 parent 127c576 commit 647d49d

2 files changed

Lines changed: 1 addition & 15 deletions

File tree

src/pubtools/pulplib/_impl/client_pulp3/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from json import JSONDecodeError
44
import logging
55
import os
6-
from typing import Any, Dict, Optional
6+
from typing import Any, Dict, Optional, Union, Tuple
77
from urllib.parse import urljoin
88

99
import anyio

tests/client_pulp3/test_client_errors.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -92,20 +92,6 @@ async def test_404_after_retries(respx_mock, pulp3_client):
9292
assert route.call_count == 2
9393

9494

95-
@pytest.mark.anyio
96-
async def test_http_400_error_raises(respx_mock, pulp3_client):
97-
"""Test that 400 Bad Request raises HTTPStatusError."""
98-
respx_mock.post(
99-
"https://pulp.example.com/api/pulp/test-domain/api/v3/repositories/rpm/rpm/"
100-
).mock(return_value=httpx.Response(400, json={"detail": "Invalid data"}))
101-
102-
async with pulp3_client() as client:
103-
with pytest.raises(httpx.HTTPStatusError) as exc_info:
104-
await client.create_repository(name="bad-name")
105-
106-
assert exc_info.value.response.status_code == 400
107-
108-
10995
@pytest.mark.anyio
11096
async def test_http_401_unauthorized_raises(respx_mock, pulp3_client):
11197
"""Test that 401 Unauthorized raises HTTPStatusError."""

0 commit comments

Comments
 (0)