tests/mockblackbox.py
author Gregory Szorc <gregory.szorc@gmail.com>
Wed, 19 Sep 2018 13:48:59 -0700
changeset 39851 1f7b3b980af8
parent 37120 a8a902d7176e
child 43076 2372284d9457
permissions -rw-r--r--
lfs: add repository feature denoting the use of LFS Whether LFS is enabled seems like a useful feature to expose. This will also facilitate some future work around LFS feature compatibility. Differential Revision: https://phab.mercurial-scm.org/D4710

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