()
| 1144 | |
| 1145 | |
| 1146 | def test_disabled_auto_content_length(): |
| 1147 | class MyResponse(wrappers.Response): |
| 1148 | automatically_set_content_length = False |
| 1149 | |
| 1150 | resp = MyResponse("Hello World!") |
| 1151 | assert resp.content_length is None |
| 1152 | |
| 1153 | resp = MyResponse(["Hello World!"]) |
| 1154 | assert resp.content_length is None |
| 1155 | assert "Content-Length" not in resp.get_wsgi_headers({}) |
| 1156 | |
| 1157 | resp = MyResponse() |
| 1158 | resp.make_conditional({"REQUEST_METHOD": "GET"}) |
| 1159 | assert resp.content_length is None |
| 1160 | assert "Content-Length" not in resp.get_wsgi_headers({}) |
| 1161 | |
| 1162 | |
| 1163 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected