'Requests containing Expect: 100-continue cause provisional 100
responses to be emitted.'

def test_respondWith100Continue(self):

    connection = H2Connection()
    connection.requestFactory = DummyHTTPHandlerProxy
    headers = (self.getRequestHeaders + [('expect', '100-continue')])
    (_, transport) = self.connectAndReceive(connection, headers, [])
    def validate(streamID):
        frames = framesFromBytes(transport.value())
        self.assertEqual(len(frames), 5)
        self.assertTrue(all(((f.stream_id == 1) for f in frames[1:])))
        self.assertTrue(isinstance(frames[1], hyperframe.frame.HeadersFrame))
        self.assertEqual(frames[1].data, [(':status', '100')])
        self.assertTrue(('END_STREAM' in frames[(-1)].flags))
    return connection._streamCleanupCallbacks[1].addCallback(validate)
