Show More
@@ -1029,6 +1029,8 b' class clientreactor(object):' | |||||
1029 | 'without beginning of stream flag set'), |
|
1029 | 'without beginning of stream flag set'), | |
1030 | } |
|
1030 | } | |
1031 |
|
1031 | |||
|
1032 | self._incomingstreams[frame.streamid] = stream(frame.streamid) | |||
|
1033 | ||||
1032 | if frame.streamflags & STREAM_FLAG_ENCODING_APPLIED: |
|
1034 | if frame.streamflags & STREAM_FLAG_ENCODING_APPLIED: | |
1033 | raise error.ProgrammingError('support for decoding stream ' |
|
1035 | raise error.ProgrammingError('support for decoding stream ' | |
1034 | 'payloads not yet implemneted') |
|
1036 | 'payloads not yet implemneted') |
@@ -105,6 +105,26 b' class BadFrameRecvTests(unittest.TestCas' | |||||
105 | 'unhandled frame type'): |
|
105 | 'unhandled frame type'): | |
106 | sendframe(reactor, ffs(b'1 0 stream-begin text-output 0 foo')) |
|
106 | sendframe(reactor, ffs(b'1 0 stream-begin text-output 0 foo')) | |
107 |
|
107 | |||
|
108 | class StreamTests(unittest.TestCase): | |||
|
109 | def testmultipleresponseframes(self): | |||
|
110 | reactor = framing.clientreactor(buffersends=False) | |||
|
111 | ||||
|
112 | request, action, meta = reactor.callcommand(b'foo', {}) | |||
|
113 | ||||
|
114 | self.assertEqual(action, 'sendframes') | |||
|
115 | for f in meta['framegen']: | |||
|
116 | pass | |||
|
117 | ||||
|
118 | action, meta = sendframe( | |||
|
119 | reactor, | |||
|
120 | ffs(b'%d 0 stream-begin 4 0 foo' % request.requestid)) | |||
|
121 | self.assertEqual(action, 'responsedata') | |||
|
122 | ||||
|
123 | action, meta = sendframe( | |||
|
124 | reactor, | |||
|
125 | ffs(b'%d 0 0 4 eos bar' % request.requestid)) | |||
|
126 | self.assertEqual(action, 'responsedata') | |||
|
127 | ||||
108 | if __name__ == '__main__': |
|
128 | if __name__ == '__main__': | |
109 | import silenttestrunner |
|
129 | import silenttestrunner | |
110 | silenttestrunner.main(__name__) |
|
130 | silenttestrunner.main(__name__) |
General Comments 0
You need to be logged in to leave comments.
Login now