#NEWLINE# def test_list_value_is_or( self ) : #NEWLINE# #INDENT# q1 = QuestionFactory ( metadata = { #NEWLINE# #INDENT# 'os' : 'Linux' , #NEWLINE# #UNINDENT# } ) #NEWLINE# q2 = QuestionFactory ( metadata = { #NEWLINE# #INDENT# 'os' : 'OSX' , #NEWLINE# #UNINDENT# } ) #NEWLINE# QuestionFactory ( metadata = { #NEWLINE# #INDENT# 'os' : 'Windows 7' , #NEWLINE# #UNINDENT# } ) #NEWLINE# res = self . filter ( { #NEWLINE# #INDENT# 'os' : [ 'Linux' , 'OSX' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# eq_ ( sorted ( self , key = ( lambda q : q . id ) ) , [ q1 , q2 ] )