@ -120,6 +120,8 @@ index fe3de7b..54ae6e1 100755
self . _root = obj . fake_root_dir
self . _root = obj . fake_root_dir
def RepositoryRoot ( self ) :
def RepositoryRoot ( self ) :
return self . _root
return self . _root
def GetOwnersStatusFile ( self ) :
return None
self . mox . StubOutWithMock ( presubmit , ' random ' )
self . mox . StubOutWithMock ( presubmit , ' random ' )
self . mox . StubOutWithMock ( presubmit , ' warn ' )
self . mox . StubOutWithMock ( presubmit , ' warn ' )
@ -511,6 +513,7 @@ class PresubmitUnittest(PresubmitTestsBase):
0 ,
0 ,
0 ,
0 ,
None )
None )
change . GetOwnersStatusFile = lambda : None
executer = presubmit . PresubmitExecuter ( change , False , None , False )
executer = presubmit . PresubmitExecuter ( change , False , None , False )
self . failIf ( executer . ExecPresubmitScript ( ' ' , fake_presubmit ) )
self . failIf ( executer . ExecPresubmitScript ( ' ' , fake_presubmit ) )
# No error if no on-upload entry point
# No error if no on-upload entry point
@ -1065,6 +1068,7 @@ class InputApiUnittest(PresubmitTestsBase):
0 ,
0 ,
0 ,
0 ,
None )
None )
change . GetOwnersStatusFile = lambda : None
input_api = presubmit . InputApi (
input_api = presubmit . InputApi (
change ,
change ,
presubmit . os . path . join ( self . fake_root_dir , ' foo ' , ' PRESUBMIT.py ' ) ,
presubmit . os . path . join ( self . fake_root_dir , ' foo ' , ' PRESUBMIT.py ' ) ,
@ -1193,6 +1197,7 @@ class InputApiUnittest(PresubmitTestsBase):
change = presubmit . GitChange (
change = presubmit . GitChange (
' mychange ' , ' ' , self . fake_root_dir , files , 0 , 0 , None )
' mychange ' , ' ' , self . fake_root_dir , files , 0 , 0 , None )
change . GetOwnersStatusFile = lambda : None
input_api = presubmit . InputApi (
input_api = presubmit . InputApi (
change ,
change ,
presubmit . os . path . join ( self . fake_root_dir , ' PRESUBMIT.py ' ) ,
presubmit . os . path . join ( self . fake_root_dir , ' PRESUBMIT.py ' ) ,
@ -1213,6 +1218,7 @@ class InputApiUnittest(PresubmitTestsBase):
change = presubmit . GitChange (
change = presubmit . GitChange (
' mychange ' , ' ' , self . fake_root_dir , files , 0 , 0 , None )
' mychange ' , ' ' , self . fake_root_dir , files , 0 , 0 , None )
change . GetOwnersStatusFile = lambda : None
input_api = presubmit . InputApi (
input_api = presubmit . InputApi (
change , ' ./PRESUBMIT.py ' , False , None , False )
change , ' ./PRESUBMIT.py ' , False , None , False )
# Sample usage of overiding the default white and black lists.
# Sample usage of overiding the default white and black lists.
@ -1535,9 +1541,9 @@ class ChangeUnittest(PresubmitTestsBase):
members = [
members = [
' AbsoluteLocalPaths ' , ' AffectedFiles ' , ' AffectedTestableFiles ' ,
' AbsoluteLocalPaths ' , ' AffectedFiles ' , ' AffectedTestableFiles ' ,
' AffectedTextFiles ' ,
' AffectedTextFiles ' ,
' AllFiles ' , ' DescriptionText ' , ' FullDescriptionText ' , ' LocalPaths ' ,
' AllFiles ' , ' DescriptionText ' , ' FullDescriptionText ' ,
' Name' , ' RepositoryRoot ' , ' RightHandSideLines ' ,
' GetOwnersStatusFile' , ' LocalPaths ' , ' Name ' , ' RepositoryRoot ' ,
' SetDescriptionText' , ' TAG_LINE_RE ' ,
' RightHandSideLines' , ' SetDescriptionText' , ' TAG_LINE_RE ' ,
' author_email ' , ' issue ' , ' patchset ' , ' scm ' , ' tags ' ,
' author_email ' , ' issue ' , ' patchset ' , ' scm ' , ' tags ' ,
]
]
# If this test fails, you should add the relevant test.
# If this test fails, you should add the relevant test.