#NEWLINE# @ patch_object ( Git , '_call_process' ) #NEWLINE# def test_stats( self , git ) : #NEWLINE# #INDENT# git . return_value = fixture ( 'diff_tree_numstat_root' ) #NEWLINE# commit = Commit ( commit . repo , id = '634396b2f541a9f2d58b00be1a07f0c358b999b3' ) #NEWLINE# commit . __bake_it__ ( ) #NEWLINE# stats = commit . stats #NEWLINE# keys = stats . files . keys ( ) #NEWLINE# keys . sort ( ) #NEWLINE# assert_equal ( [ 'a.txt' , 'b.txt' ] , keys ) #NEWLINE# assert_true ( git . called ) #NEWLINE# assert_equal ( git . call_args , ( ( 'diff_tree' , '634396b2f541a9f2d58b00be1a07f0c358b999b3' , '--' ) , { #NEWLINE# #INDENT# 'numstat' : True , #NEWLINE# 'root' : True , #NEWLINE# #UNINDENT# } ) )