#NEWLINE# def test_best( self ) : #NEWLINE# #INDENT# environ = { #NEWLINE# #INDENT# 'HTTP_ACCEPT' : 'text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8' , #NEWLINE# #UNINDENT# } #NEWLINE# a = WsgiRequest ( environ ) #NEWLINE# content_types = a . content_types #NEWLINE# self . assertTrue ( content_types ) #NEWLINE# self . assertEqual ( content_types . best_match ( ( 'text/html' , 'application/json' ) ) , 'text/html' ) #NEWLINE# self . assertEqual ( content_types . best_match ( ( 'application/json' , 'text/html' ) ) , 'text/html' )