tests/mockblackbox.py
author Augie Fackler <augie@google.com>
Wed, 14 Oct 2015 15:11:53 -0400
changeset 26712 04176eaf911b
parent 24705 0ead0a07ed9c
child 28028 ac49ecb2a897
permissions -rw-r--r--
changegroup: move manifest unpacking into its own method The upcoming cg3 will need different logic for unpacking manifests.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24705
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
from mercurial import util
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
def makedate():
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
    return 0, 0
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
def getuser():
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
    return 'bob'
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     8
# mock the date and user apis so the output is always the same
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     9
def uisetup(ui):
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    10
    util.makedate = makedate
0ead0a07ed9c tests: move mock blackbox extension into own file
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    11
    util.getuser = getuser