MCPcopy Create free account
hub / github.com/pallets/quart / test_send_file_last_modified

Function test_send_file_last_modified

tests/test_helpers.py:246–254  ·  view source on GitHub ↗
(tmp_path: Path)

Source from the content-addressed store, hash-verified

244
245
246async def test_send_file_last_modified(tmp_path: Path) -> None:
247 app = Quart(__name__)
248 file_ = tmp_path / "send.img"
249 file_.write_text("something")
250 async with app.app_context():
251 response = await send_file(str(file_))
252 mtime = datetime.fromtimestamp(file_.stat().st_mtime, tz=timezone.utc)
253 mtime = mtime.replace(microsecond=0)
254 assert response.last_modified == mtime
255
256
257async def test_send_file_last_modified_override(tmp_path: Path) -> None:

Callers

nothing calls this directly

Calls 3

app_contextMethod · 0.95
QuartClass · 0.90
send_fileFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…