view tests/mockblackbox.py @ 49863:a6e2a668c746

peer: have a common constructor and use it For now it does not do much, but we will extend it to also store a path object soon.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sat, 03 Dec 2022 00:00:41 +0100
parents 6000f5b25c9b
children
line wrap: on
line source

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