@ -210,7 +210,7 @@ class PresubmitUnittest(PresubmitTestsBase):
files = files )
change = presubmit . GclChange ( ci )
self . failUnless ( change . Chang e( ) == ' mychange ' )
self . failUnless ( change . Nam e( ) == ' mychange ' )
self . failUnless ( change . DescriptionText ( ) ==
' Hello there \n this is a change \n and some more regular text ' )
self . failUnless ( change . FullDescriptionText ( ) ==
@ -489,6 +489,13 @@ def CheckChangeOnUpload(input_api, output_api):
return [ output_api . PresubmitError ( ' Tag parsing failed. 6 ' ) ]
if input_api . change . STORY != ' http://tracker.com/42 ' :
return [ output_api . PresubmitError ( ' Tag parsing failed. 7 ' ) ]
try :
y = False
x = input_api . change . invalid
except AttributeError :
y = True
if not y :
return [ output_api . PresubmitError ( ' Tag parsing failed. 8 ' ) ]
if ' TEST ' in input_api . change . tags :
return [ output_api . PresubmitError ( ' Tag parsing failed. 3 ' ) ]
if input_api . change . DescriptionText ( ) != ' Blah Blah ' :
@ -907,8 +914,8 @@ class GclChangeUnittest(PresubmitTestsBase):
def testMembersChanged ( self ) :
self . mox . ReplayAll ( )
members = [
' AbsoluteLocalPaths ' , ' AffectedFiles ' , ' AffectedTextFiles ' , ' Change ' ,
' DescriptionText ' , ' FullDescriptionText ' , ' LocalPaths ' ,
' AbsoluteLocalPaths ' , ' AffectedFiles ' , ' AffectedTextFiles ' ,
' DescriptionText ' , ' FullDescriptionText ' , ' LocalPaths ' , ' Name ' ,
' RepositoryRoot ' , ' RightHandSideLines ' , ' ServerPaths ' ,
' issue ' , ' patchset ' , ' tags ' ,
]