'Ensure that the FORCE_SCRIPT_NAME setting takes precedence over the
request\'s SCRIPT_NAME environment parameter.
Refs #20169.'

def test_wsgirequest_with_force_script_name(self):

    with override_settings(FORCE_SCRIPT_NAME=u'/FORCED_PREFIX/'):
        request = WSGIRequest({u'PATH_INFO': u'/somepath/', u'SCRIPT_NAME': u'/PREFIX/', u'REQUEST_METHOD': u'get', u'wsgi.input': BytesIO('')})
        self.assertEqual(request.path, u'/FORCED_PREFIX/somepath/')
