tests/mockblackbox.py
author Jun Wu <quark@fb.com>
Mon, 14 Mar 2016 12:32:09 +0000
changeset 28515 491eabd0df79
parent 28028 ac49ecb2a897
child 28943 417380aa5bbe
permissions -rw-r--r--
dispatch: extract common logic for handling ParseError The way ParseError is handled at two different places in dispatch.py is the same. Move common logic into _formatparse.

from mercurial import util

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

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