Skip to content

Commit ee115b1

Browse files
tests: Rename test methods and files to align with singular URL conversion
- Updated test file names: `test_convert_urls_to_pdf.py -> test_convert_url_to_pdf.py` `test_live_convert_urls_to_pdf.py -> test_live_convert_url_to_pdf.py` - Renamed test functions to reflect singular URL input: - `test_convert_urls_to_pdf_success` → `test_convert_url_to_pdf_success` - `test_convert_urls_to_pdf_validation_errors` → `test_convert_url_to_pdf_validation_errors` - `test_async_convert_urls_to_pdf_request_customization` → `test_async_convert_url_to_pdf_request_customization` - `test_live_convert_urls_to_pdf_success` → `test_live_convert_url_to_pdf_success` - `test_live_async_convert_urls_to_pdf_invalid_page_size` → `test_live_async_convert_url_to_pdf_invalid_page_size` Assisted-by: Codex
1 parent 5e2b358 commit ee115b1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/live/test_live_convert_urls_to_pdf.py renamed to tests/live/test_live_convert_url_to_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
LIVE_HTML_URL = "https://example.com"
88

99

10-
def test_live_convert_urls_to_pdf_success(
10+
def test_live_convert_url_to_pdf_success(
1111
pdfrest_api_key: str,
1212
pdfrest_live_base_url: str,
1313
) -> None:
@@ -34,7 +34,7 @@ def test_live_convert_urls_to_pdf_success(
3434

3535

3636
@pytest.mark.asyncio
37-
async def test_live_async_convert_urls_to_pdf_invalid_page_size(
37+
async def test_live_async_convert_url_to_pdf_invalid_page_size(
3838
pdfrest_api_key: str,
3939
pdfrest_live_base_url: str,
4040
) -> None:
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .graphics_test_helpers import ASYNC_API_KEY, VALID_API_KEY, build_file_info_payload
1414

1515

16-
def test_convert_urls_to_pdf_success(monkeypatch: pytest.MonkeyPatch) -> None:
16+
def test_convert_url_to_pdf_success(monkeypatch: pytest.MonkeyPatch) -> None:
1717
monkeypatch.delenv("PDFREST_API_KEY", raising=False)
1818
url = "https://example.com/page"
1919
output_id = str(PdfRestFileID.generate())
@@ -67,7 +67,7 @@ def handler(request: httpx.Request) -> httpx.Response:
6767
assert response.output_file.type == "application/pdf"
6868

6969

70-
def test_convert_urls_to_pdf_validation_errors() -> None:
70+
def test_convert_url_to_pdf_validation_errors() -> None:
7171
with pytest.raises(ValidationError, match="Input should be a valid URL"):
7272
ConvertUrlToPdfPayload.model_validate({"url": "not-a-url"})
7373

@@ -78,7 +78,7 @@ def test_convert_urls_to_pdf_validation_errors() -> None:
7878

7979

8080
@pytest.mark.asyncio
81-
async def test_async_convert_urls_to_pdf_request_customization(
81+
async def test_async_convert_url_to_pdf_request_customization(
8282
monkeypatch: pytest.MonkeyPatch,
8383
) -> None:
8484
monkeypatch.delenv("PDFREST_API_KEY", raising=False)

0 commit comments

Comments
 (0)