tests: use $HTTP_DATE$ for Date header
Support for the $HTTP_DATE$ substitution was recently added. Let's
adopt it more widely.
We had to tweak the substitution to be case insensitive, since
HTTP headers are case insensitive. I also found a minor test
issue not globbing over the length of the Server response header.
Differential Revision: https://phab.mercurial-scm.org/D2839
from __future__ import absolute_import
from mercurial import (
util,
)
# XXX: we should probably offer a devel option to do this in blackbox directly
def getuser():
return b'bob'
def getpid():
return 5000
# mock the date and user apis so the output is always the same
def uisetup(ui):
util.getuser = getuser
util.getpid = getpid