tests/mockblackbox.py
changeset 32412 043948c84647
parent 28943 417380aa5bbe
child 36105 f49c3ee5b02f
equal deleted inserted replaced
32411:08d02c1d7e67 32412:043948c84647
     1 from __future__ import absolute_import
     1 from __future__ import absolute_import
     2 from mercurial import (
     2 from mercurial import (
     3     util,
     3     util,
     4 )
     4 )
     5 
     5 
     6 def makedate():
     6 # XXX: we should probably offer a devel option to do this in blackbox directly
     7     return 0, 0
       
     8 def getuser():
     7 def getuser():
     9     return 'bob'
     8     return 'bob'
    10 def getpid():
     9 def getpid():
    11     return 5000
    10     return 5000
    12 
    11 
    13 # mock the date and user apis so the output is always the same
    12 # mock the date and user apis so the output is always the same
    14 def uisetup(ui):
    13 def uisetup(ui):
    15     util.makedate = makedate
       
    16     util.getuser = getuser
    14     util.getuser = getuser
    17     util.getpid = getpid
    15     util.getpid = getpid