Show More
@@ -2,9 +2,6 from __future__ import absolute_import, | |||
|
2 | 2 | |
|
3 | 3 | import unittest |
|
4 | 4 | |
|
5 | from mercurial.thirdparty import ( | |
|
6 | cbor, | |
|
7 | ) | |
|
8 | 5 | from mercurial import ( |
|
9 | 6 | ui as uimod, |
|
10 | 7 | util, |
@@ -16,7 +13,7 from mercurial.utils import ( | |||
|
16 | 13 | |
|
17 | 14 | ffs = framing.makeframefromhumanstring |
|
18 | 15 | |
|
19 |
OK = |
|
|
16 | OK = b''.join(cborutil.streamencode({b'status': b'ok'})) | |
|
20 | 17 | |
|
21 | 18 | def makereactor(deferoutput=False): |
|
22 | 19 | ui = uimod.ui() |
@@ -270,20 +267,20 class ServerReactorTests(unittest.TestCa | |||
|
270 | 267 | }) |
|
271 | 268 | |
|
272 | 269 | def testinterleavedcommands(self): |
|
273 |
cbor1 = |
|
|
270 | cbor1 = b''.join(cborutil.streamencode({ | |
|
274 | 271 | b'name': b'command1', |
|
275 | 272 | b'args': { |
|
276 | 273 | b'foo': b'bar', |
|
277 | 274 | b'key1': b'val', |
|
278 | 275 | } |
|
279 | }, canonical=True) | |
|
280 |
cbor3 = |
|
|
276 | })) | |
|
277 | cbor3 = b''.join(cborutil.streamencode({ | |
|
281 | 278 | b'name': b'command3', |
|
282 | 279 | b'args': { |
|
283 | 280 | b'biz': b'baz', |
|
284 | 281 | b'key': b'val', |
|
285 | 282 | }, |
|
286 | }, canonical=True) | |
|
283 | })) | |
|
287 | 284 | |
|
288 | 285 | results = list(sendframes(makereactor(), [ |
|
289 | 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