tests/mockblackbox.py
author Pierre-Yves David <pierre-yves.david@fb.com>
Wed, 23 Sep 2015 11:55:27 -0700
changeset 26394 e75da738add5
parent 24705 0ead0a07ed9c
child 28028 ac49ecb2a897
permissions -rw-r--r--
bundle2: allow to specify unsupported value on error A client may support an argument but not some of its values (eg: coming "compression" parameters). We allow this case to be carried in the exception.

from mercurial import util

def makedate():
    return 0, 0
def getuser():
    return 'bob'

# mock the date and user apis so the output is always the same
def uisetup(ui):
    util.makedate = makedate
    util.getuser = getuser