view tests/mockblackbox.py @ 41589:46432c04f010

tests: enable HTTP digest testing I suppose we could spin the client side extension off to a *.py file if it gets more use. I was basically just looking to avoid killing the server and relaunching it just to change authentication schemes, because that doesn't always work on Windows. The test changes capture the problem with py3.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 05 Feb 2019 16:47:19 -0500
parents a8a902d7176e
children 2372284d9457
line wrap: on
line source

from __future__ import absolute_import
from mercurial.utils import (
    procutil,
)

# 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):
    procutil.getuser = getuser
    procutil.getpid = getpid