Test scheme detection from HTTPS variable.
(self)
| 150 | assert headers_dict['CONTENT-LENGTH'] == '0' |
| 151 | |
| 152 | def test_https_scheme(self): |
| 153 | """Test scheme detection from HTTPS variable.""" |
| 154 | packet = make_uwsgi_packet({ |
| 155 | 'REQUEST_METHOD': 'GET', |
| 156 | 'PATH_INFO': '/', |
| 157 | 'HTTPS': 'on', |
| 158 | }) |
| 159 | unreader = IterUnreader([packet]) |
| 160 | cfg = MockConfig() |
| 161 | |
| 162 | req = UWSGIRequest(cfg, unreader, ('127.0.0.1', 12345)) |
| 163 | |
| 164 | assert req.scheme == 'https' |
| 165 | |
| 166 | def test_wsgi_url_scheme(self): |
| 167 | """Test scheme from wsgi.url_scheme variable.""" |
nothing calls this directly
no test coverage detected