#NEWLINE# def test_partial_match( self ) : #NEWLINE# #INDENT# key = 'key1' #NEWLINE# partial_key = 'Should be key2' #NEWLINE# no_key = 'no key here' #NEWLINE# test_dict = { #NEWLINE# #INDENT# 'key1' : 'This is key1' , #NEWLINE# 'key2' : 'This is key2' , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertEqual ( utils . partial_match ( test_dict , key ) , 'This is key1' ) #NEWLINE# self . assertEqual ( utils . partial_match ( test_dict , partial_key ) , 'This is key2' ) #NEWLINE# self . assertIsNone ( utils . partial_match ( test_dict , no_key ) )