changeset 36944:65615c29e74f

tests: fix test-wireproto.py to work around serverrepo() not having a ui This started failing recently, but it doesn't look important as no actual ui objects have been in play. Differential Revision: https://phab.mercurial-scm.org/D2867
author Augie Fackler <augie@google.com>
date Wed, 14 Mar 2018 15:56:34 -0400
parents c8768bc46d24
children 4901d1e22b27
files tests/test-wireproto.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-wireproto.py	Tue Mar 13 22:53:49 2018 -0400
+++ b/tests/test-wireproto.py	Wed Mar 14 15:56:34 2018 -0400
@@ -3,6 +3,7 @@
 from mercurial import (
     error,
     pycompat,
+    ui as uimod,
     util,
     wireproto,
     wireprototypes,
@@ -22,12 +23,13 @@
         pass
 
 class clientpeer(wireproto.wirepeer):
-    def __init__(self, serverrepo):
+    def __init__(self, serverrepo, ui):
         self.serverrepo = serverrepo
+        self._ui = ui
 
     @property
     def ui(self):
-        return self.serverrepo.ui
+        return self._ui
 
     def url(self):
         return b'test'
@@ -84,7 +86,7 @@
 wireproto.commands[b'greet'] = (greet, b'name',)
 
 srv = serverrepo()
-clt = clientpeer(srv)
+clt = clientpeer(srv, uimod.ui())
 
 print(clt.greet(b"Foobar"))
 b = clt.iterbatch()