Show More
@@ -2,9 +2,6 b' from __future__ import absolute_import, ' | |||||
2 |
|
2 | |||
3 | import unittest |
|
3 | import unittest | |
4 |
|
4 | |||
5 | from mercurial.thirdparty import ( |
|
|||
6 | cbor, |
|
|||
7 | ) |
|
|||
8 | from mercurial import ( |
|
5 | from mercurial import ( | |
9 | ui as uimod, |
|
6 | ui as uimod, | |
10 | util, |
|
7 | util, | |
@@ -16,7 +13,7 b' from mercurial.utils import (' | |||||
16 |
|
13 | |||
17 | ffs = framing.makeframefromhumanstring |
|
14 | ffs = framing.makeframefromhumanstring | |
18 |
|
15 | |||
19 |
OK = |
|
16 | OK = b''.join(cborutil.streamencode({b'status': b'ok'})) | |
20 |
|
17 | |||
21 | def makereactor(deferoutput=False): |
|
18 | def makereactor(deferoutput=False): | |
22 | ui = uimod.ui() |
|
19 | ui = uimod.ui() | |
@@ -270,20 +267,20 b' class ServerReactorTests(unittest.TestCa' | |||||
270 | }) |
|
267 | }) | |
271 |
|
268 | |||
272 | def testinterleavedcommands(self): |
|
269 | def testinterleavedcommands(self): | |
273 |
cbor1 = |
|
270 | cbor1 = b''.join(cborutil.streamencode({ | |
274 | b'name': b'command1', |
|
271 | b'name': b'command1', | |
275 | b'args': { |
|
272 | b'args': { | |
276 | b'foo': b'bar', |
|
273 | b'foo': b'bar', | |
277 | b'key1': b'val', |
|
274 | b'key1': b'val', | |
278 | } |
|
275 | } | |
279 | }, canonical=True) |
|
276 | })) | |
280 |
cbor3 = |
|
277 | cbor3 = b''.join(cborutil.streamencode({ | |
281 | b'name': b'command3', |
|
278 | b'name': b'command3', | |
282 | b'args': { |
|
279 | b'args': { | |
283 | b'biz': b'baz', |
|
280 | b'biz': b'baz', | |
284 | b'key': b'val', |
|
281 | b'key': b'val', | |
285 | }, |
|
282 | }, | |
286 | }, canonical=True) |
|
283 | })) | |
287 |
|
284 | |||
288 | results = list(sendframes(makereactor(), [ |
|
285 | results = list(sendframes(makereactor(), [ | |
289 | ffs(b'1 1 stream-begin command-request new|more %s' % cbor1[0:6]), |
|
286 | ffs(b'1 1 stream-begin command-request new|more %s' % cbor1[0:6]), |
General Comments 0
You need to be logged in to leave comments.
Login now