tests/mockblackbox.py
author Gregory Szorc <gregory.szorc@gmail.com>
Wed, 30 Dec 2015 17:12:59 -0700
changeset 27578 d35ff0b0d0da
parent 24705 0ead0a07ed9c
child 28028 ac49ecb2a897
permissions -rw-r--r--
templates: make earlycommands and othercommands optional We now have sub-topics in the help system. The "helptopics" template serves as a mechanism for displaying an index of help topics. Previously, it was only used to show the top-level list of help topics, which includes special groupings of topics. In the near future, we'll adapt "helptopics" for showing the index of sub-topics. In this patch, we optionally render {earlycommands} and {othercommands} since they aren't present on sub-topics.

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