tests/mockblackbox.py
author Georges Racinet <georges.racinet@octobus.net>
Wed, 27 Feb 2019 23:45:06 +0100
changeset 41878 82884bbf8d2b
parent 37120 a8a902d7176e
child 43076 2372284d9457
permissions -rw-r--r--
discovery: rename `srvheads` to `knownsrvheads` The `srvheads` variable only contains the known set of remove heads. Renaming the variable make it clearer.

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