#NEWLINE# def test_mercurial_project_detected( self ) : #NEWLINE# #INDENT# response = Response ( ) #NEWLINE# response . status_code = 0 #NEWLINE# self . patched [ 'wakatime.packages.requests.adapters.HTTPAdapter.send' ] . return_value = response #NEWLINE# with utils . mock . patch ( 'wakatime.projects.git.Git.process' ) as mock_git : #NEWLINE# #INDENT# mock_git . return_value = False #NEWLINE# now = u ( int ( time . time ( ) ) ) #NEWLINE# entity = 'tests/samples/projects/hg/emptyfile.txt' #NEWLINE# config = 'tests/samples/configs/good_config.cfg' #NEWLINE# args = [ '--file' , entity , '--config' , config , '--time' , entity ] #NEWLINE# execute ( args ) #NEWLINE# self . assertEquals ( 'hg' , self . patched [ 'wakatime.offlinequeue.Queue.push' ] . call_args [ 0 ] [ 0 ] [ 'project' ] ) #NEWLINE# self . assertEquals ( 'test-hg-branch' , self . patched [ 'wakatime.offlinequeue.Queue.push' ] . call_args [ 0 ] [ 0 ] [ 'branch' ] )