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