comparison tests/mockblackbox.py @ 32412:043948c84647

devel: update blackbox to use default-date Blackbox now obeys the 'devel.default-date' option. As a side effect we can delete the mock for blackblox related tests.
author Boris Feld <boris.feld@octobus.net>
date Tue, 16 May 2017 18:36:08 +0200
parents 417380aa5bbe
children f49c3ee5b02f
comparison
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