Mercurial > public > mercurial-scm > hg
diff tests/test-check-interfaces.py @ 37547:835ccc2a5ef1
httppeer: move requestbuilder defaults into makepeer() argument
Upcoming commits will move the initial ?cmd=capabilities handshake
request out of httppeer so the handshake can be performed before a
peer instance is constructed. In order to do this, we'll need to
refactor code for making HTTP requests.
The type used to construct HTTP requests is configurable. If we'll
be making HTTP requests outside of httppeer, we should be able to
use a custom request builder. So move the definition of that type
into makepeer().
Extensions can monkeypatch the function and override the argument
value.
Differential Revision: https://phab.mercurial-scm.org/D3232
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 10 Apr 2018 10:22:26 -0700 |
parents | 93397c4633f6 |
children | 8b8a845c85fc |
line wrap: on
line diff
--- a/tests/test-check-interfaces.py Mon Apr 09 19:35:39 2018 -0700 +++ b/tests/test-check-interfaces.py Tue Apr 10 10:22:26 2018 -0700 @@ -70,7 +70,7 @@ # Facilitates testing sshpeer without requiring an SSH server. class badpeer(httppeer.httppeer): def __init__(self): - super(badpeer, self).__init__(None, None, None, dummyopener()) + super(badpeer, self).__init__(None, None, None, dummyopener(), None) self.badattribute = True def badmethod(self): @@ -89,7 +89,7 @@ ziverify.verifyClass(repository.ipeerbaselegacycommands, httppeer.httppeer) - checkzobject(httppeer.httppeer(None, None, None, dummyopener())) + checkzobject(httppeer.httppeer(None, None, None, dummyopener(), None)) ziverify.verifyClass(repository.ipeerbase, localrepo.localpeer)