'The C{\'wsgi.url_scheme\'} key of the C{environ} C{dict} passed to the
application has the request URL scheme.'

def test_wsgiURLScheme(self):

    def channelFactory():
        channel = DummyChannel()
        channel.transport = DummyChannel.SSL()
        return channel
    self.channelFactory = DummyChannel
    httpDeferred = self.render('GET', '1.1', [], [''])
    httpDeferred.addCallback(self.environKeyEqual('wsgi.url_scheme', 'http'))
    self.channelFactory = channelFactory
    httpsDeferred = self.render('GET', '1.1', [], [''])
    httpsDeferred.addCallback(self.environKeyEqual('wsgi.url_scheme', 'https'))
    return gatherResults([httpDeferred, httpsDeferred])
