#NEWLINE# def test_search_on_multiple_values( self ) : #NEWLINE# #INDENT# credit_card = Customer . create ( { #NEWLINE# #INDENT# 'credit_card' : { #NEWLINE# #INDENT# 'number' : '4111111111111111' , #NEWLINE# 'expiration_date' : '05/2010' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) . customer . credit_cards [ 0 ] #NEWLINE# active_subscription = Subscription . create ( { #NEWLINE# #INDENT# 'payment_method_token' : credit_card . token , #NEWLINE# 'plan_id' : TestHelper . trialless_plan [ 'id' ] , #NEWLINE# #UNINDENT# } ) . subscription #NEWLINE# canceled_subscription = Subscription . create ( { #NEWLINE# #INDENT# 'payment_method_token' : credit_card . token , #NEWLINE# 'plan_id' : TestHelper . trialless_plan [ 'id' ] , #NEWLINE# #UNINDENT# } ) . subscription #NEWLINE# Subscription . cancel ( canceled_subscription . id ) #NEWLINE# collection = Subscription . search ( [ ( SubscriptionSearch . plan_id == 'integration_trialless_plan' ) , SubscriptionSearch . status . in_list ( [ Subscription . Status . Active ] ) ] ) #NEWLINE# self . assertTrue ( TestHelper . includes ( collection , active_subscription ) ) #NEWLINE# self . assertFalse ( TestHelper . includes ( collection , self ) )