#NEWLINE# def test_chained_filter( self ) : #NEWLINE# #INDENT# self . assertEquals ( FieldsWithOptionsModel . objects . filter ( floating_point__lt = 5.3 , floating_point__gt = 2.6 ) . count ( ) , 0 ) #NEWLINE# self . assertEquals ( [ ( entity . floating_point , entity . integer ) for entity in FieldsWithOptionsModel . objects . filter ( floating_point__lte = 5.3 , integer = 2 ) . order_by ( 'floating_point' ) ] , [ ( 2.6 , 2 ) ] ) #NEWLINE# self . assertEquals ( [ entity . email for entity in FieldsWithOptionsModel . objects . filter ( email__gte = 'rinnengan@sage.de' , integer = 2 ) . order_by ( 'email' ) ] , [ 'sharingan@uchias.com' ] ) #NEWLINE# self . assertEquals ( [ entity . email for entity in FieldsWithOptionsModel . objects . filter ( email__in = [ 'rinnengan@sage.de' , 'sharingan@uchias.com' ] , integer__gt = 2 ) . order_by ( 'integer' ) ] , [ 'rinnengan@sage.de' ] ) #NEWLINE# self . assertRaises ( DatabaseError , ( lambda : FieldsWithOptionsModel . objects . filter ( email__gte = 'rinnengan@sage.de' , floating_point = 5.3 ) . order_by ( 'floating_point' ) [ 0 ] ) ) #NEWLINE# self . assertRaises ( DatabaseError , FieldsWithOptionsModel . objects . filter ( floating_point__lte = 5.3 , integer__gte = 2 ) . order_by ( 'floating_point' ) . get ) #NEWLINE# self . assertRaises ( DatabaseError , FieldsWithOptionsModel . objects . filter ( email__lte = 'rinnengan@sage.de' ) . exclude ( floating_point__lt = 9.1 ) . order_by ( 'email' ) . get ) #NEWLINE# self . assertRaises ( DatabaseError , ( lambda : FieldsWithOptionsModel . objects . all ( ) . exclude ( floating_point__lt = 9.1 ) . order_by ( 'email' ) [ 0 ] ) )