'Ensure that the request\'s path is correctly assembled, regardless of
whether or not the SCRIPT_NAME has a trailing slash.
Refs #20169.'

def test_wsgirequest_with_script_name(self):

    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'/PREFIX/somepath/')
    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'/PREFIX/somepath/')
