#NEWLINE# def check_pom( test , pom , org_name , artifact_name , version , dependencies ) : #NEWLINE# #INDENT# '\n    Check the contents of the pom. Make sure the groupId, artifactId, and version are properly set.\n    :param org_name: organization (group) id of the package\n    :param artifact_name: artifact id of package\n    :param version: version of release\n    :param dependencies: List of dependencies expected in the pom\n    ' #NEWLINE# contents = pom . read ( ) . decode ( 'utf-8' ) #NEWLINE# def gen_coordinate_regex( org , artifact , v ) : #NEWLINE# #INDENT# regex = ( '<groupId>\\s*%s\\s*<\\/groupId>\\s*' % org ) #NEWLINE# regex += ( '<artifactId>\\s*%s\\s*<\\/artifactId>\\s*' % artifact ) #NEWLINE# regex += ( '<version>\\s*%s\\s*<\\/version>' % v ) #NEWLINE# return regex #NEWLINE# #UNINDENT# main = gen_coordinate_regex ( org_name , artifact_name , version ) #NEWLINE# test . assertTrue ( ( len ( re . findall ( main , contents ) ) == 1 ) ) #NEWLINE# for ( dep_org , dep_art , dep_version ) in dependencies : #NEWLINE# #INDENT# dep = gen_coordinate_regex ( dep_org , main , dep_version ) #NEWLINE# test . assertTrue ( ( len ( re . findall ( dep , contents ) ) == 1 ) ) #NEWLINE# #UNINDENT# pom . close ( )