mockblackbox.py
16 lines
| 363 B
| text/x-python
|
PythonLexer
/ tests / mockblackbox.py
Robert Stanca
|
r28943 | from __future__ import absolute_import | ||
Augie Fackler
|
r43346 | from mercurial.utils import procutil | ||
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(): | ||
Gregory Szorc
|
r36122 | return b'bob' | ||
Augie Fackler
|
r43346 | |||
timeless
|
r28028 | def getpid(): | ||
return 5000 | ||||
Gregory Szorc
|
r24705 | |||
Augie Fackler
|
r43346 | |||
Gregory Szorc
|
r24705 | # mock the date and user apis so the output is always the same | ||
def uisetup(ui): | ||||
Yuya Nishihara
|
r37138 | procutil.getuser = getuser | ||
procutil.getpid = getpid | ||||