view tests/mockblackbox.py @ 28668:07f1fbf1f758

exchange: make _pushb2ctx() look more like _getbundlechangegrouppart() The functions already have a lot in common, but were structured a little differently.
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 25 Mar 2016 16:13:28 -0700
parents ac49ecb2a897
children 417380aa5bbe
line wrap: on
line source

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