style(tests): ruff-format the attach idempotency test (refs #615)

This commit is contained in:
kert
2026-09-08 11:46:44 -04:00
parent 1cacd0cce8
commit a6891a541c

View File

@@ -23,6 +23,8 @@ def test_second_attach_of_same_filename_returns_existing_key(tmp_path: Path):
def test_different_filename_creates_second_row(tmp_path: Path): def test_different_filename_creates_second_row(tmp_path: Path):
s = Store(str(tmp_path / "bib.sqlite"), storage_dir=tmp_path / "storage") s = Store(str(tmp_path / "bib.sqlite"), storage_dir=tmp_path / "storage")
key = s.create(Source(title="T", url="https://x/1")) key = s.create(Source(title="T", url="https://x/1"))
f1 = tmp_path / "a.pdf"; f1.write_bytes(b"a") f1 = tmp_path / "a.pdf"
f2 = tmp_path / "b.pdf"; f2.write_bytes(b"b") f1.write_bytes(b"a")
f2 = tmp_path / "b.pdf"
f2.write_bytes(b"b")
assert s.attach_file(key, f1) != s.attach_file(key, f2) assert s.attach_file(key, f1) != s.attach_file(key, f2)