diff tests/test-wireproto.py @ 37785:b4d85bc122bd

wireproto: rename wireproto to wireprotov1server (API) We have wireprotov2server, wireprotov1peer, and wireprotov2peer. wireproto only contains server functionality. So it makes sense to rename it to wireprotov1server so the naming aligns with everything else. Differential Revision: https://phab.mercurial-scm.org/D3400
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 16 Apr 2018 22:21:54 -0700
parents 33a6eee08db2
children 40381a88bab4
line wrap: on
line diff
--- a/tests/test-wireproto.py	Mon Apr 16 22:10:02 2018 -0700
+++ b/tests/test-wireproto.py	Mon Apr 16 22:21:54 2018 -0700
@@ -5,9 +5,9 @@
     pycompat,
     ui as uimod,
     util,
-    wireproto,
     wireprototypes,
     wireprotov1peer,
+    wireprotov1server,
 )
 stringio = util.stringio
 
@@ -55,7 +55,7 @@
 
     def _call(self, cmd, **args):
         args = pycompat.byteskwargs(args)
-        res = wireproto.dispatch(self.serverrepo, proto(args), cmd)
+        res = wireprotov1server.dispatch(self.serverrepo, proto(args), cmd)
         if isinstance(res, wireprototypes.bytesresponse):
             return res.data
         elif isinstance(res, bytes):
@@ -87,7 +87,7 @@
 def greet(repo, proto, name):
     return mangle(repo.greet(unmangle(name)))
 
-wireproto.commands[b'greet'] = (greet, b'name',)
+wireprotov1server.commands[b'greet'] = (greet, b'name')
 
 srv = serverrepo()
 clt = clientpeer(srv, uimod.ui())