tests/mockblackbox.py
author Augie Fackler <augie@google.com>
Fri, 10 Mar 2017 16:54:41 -0500
changeset 31301 b6ab0adf379d
parent 28943 417380aa5bbe
child 32450 043948c84647
permissions -rw-r--r--
parsers: drop old nonnormalentries method This is okay to do because the Python will fall back transparently if the method is missing.

from __future__ import absolute_import
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