#NEWLINE# @ unittest . skipUnless ( ( connection . vendor == 'postgresql' ) , 'PostgreSQL specific SQL used' ) #NEWLINE# def test_year_lte( self ) : #NEWLINE# #INDENT# baseqs = Author . objects . order_by ( 'name' ) #NEWLINE# self . assertQuerysetEqual ( baseqs . filter ( birthdate__testyear__lte = 2012 ) , [ self . a1 , self . a2 , self . a3 , self . a4 ] , ( lambda x : x ) ) #NEWLINE# self . assertQuerysetEqual ( baseqs . filter ( birthdate__testyear = 2012 ) , [ self . a2 , self . a3 , self . a4 ] , ( lambda x : x ) ) #NEWLINE# self . assertNotIn ( 'BETWEEN' , str ( baseqs . filter ( birthdate__testyear = 2012 ) . query ) ) #NEWLINE# self . assertQuerysetEqual ( baseqs . filter ( birthdate__testyear__lte = 2011 ) , [ self . a1 ] , ( lambda x : x ) ) #NEWLINE# self . assertQuerysetEqual ( baseqs . filter ( birthdate__testyear__lt = 2012 ) , [ self . a1 ] , ( lambda x : x ) )