﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36761	Closed file handles in test URL patterns for FileResponse	Mohit Sharma		"== Problem ==
Test URL patterns in `tests/wsgi/urls.py` and `tests/asgi/urls.py` use lambda functions to open files for FileResponse without proper resource management.

== Location ==
- `tests/wsgi/urls.py:18`
- `tests/asgi/urls.py:71`

== Current Code ==
path(""file/"", lambda x: FileResponse(open(__file__, ""rb""))),== Solution ==
Convert lambda functions to proper view functions to ensure better resource management and code clarity. FileResponse will still handle closing the file when the response is closed, but using proper view functions is cleaner and more maintainable.

== Patch ==
I have a patch ready that converts the lambda functions to proper view functions."	Cleanup/optimization	closed	Testing framework	dev	Normal	invalid	file-handle resource-cleanup testing	Mohit Sharma	Unreviewed	1	0	0	0	1	0
