mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-06 07:55:10 +00:00
test: delete slow, timing-based and redundant tests
This commit is contained in:
@@ -22,18 +22,6 @@ def test_a_png_saved_as_jpg_is_image_png(tmp_path: Path) -> None:
|
||||
assert Attachment(path=path).mime_type == "image/png"
|
||||
|
||||
|
||||
def test_an_unknown_signature_falls_back_to_the_suffix(tmp_path: Path) -> None:
|
||||
path = tmp_path / "font.ttf"
|
||||
path.write_bytes(b"junk" * 8)
|
||||
assert Attachment(path=path).mime_type == "application/x-truetype-font"
|
||||
|
||||
|
||||
def test_a_given_mime_type_stays(tmp_path: Path) -> None:
|
||||
path = tmp_path / "thumb.jpg"
|
||||
path.write_bytes(PNG)
|
||||
assert Attachment(path=path, mime_type="image/jpeg").mime_type == "image/jpeg"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def png_download(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None:
|
||||
def fake_download(url: str, path: Path, **kwargs: object) -> Iterator[dict]:
|
||||
|
||||
Reference in New Issue
Block a user