mockblackbox.py
15 lines
| 350 B
| text/x-python
|
PythonLexer
/ tests / mockblackbox.py
Robert Stanca
|
r28943 | from __future__ import absolute_import | ||
from mercurial import ( | ||||
util, | ||||
) | ||||
Gregory Szorc
|
r24705 | |||
Boris Feld
|
r32412 | # XXX: we should probably offer a devel option to do this in blackbox directly | ||
Gregory Szorc
|
r24705 | def getuser(): | ||
return 'bob' | ||||
timeless
|
r28028 | def getpid(): | ||
return 5000 | ||||
Gregory Szorc
|
r24705 | |||
# mock the date and user apis so the output is always the same | ||||
def uisetup(ui): | ||||
util.getuser = getuser | ||||
timeless
|
r28028 | util.getpid = getpid | ||