#NEWLINE# def test_return_type( self ) : #NEWLINE# #INDENT# b = BooleanModel ( ) #NEWLINE# b . bfield = True #NEWLINE# b . save ( ) #NEWLINE# b2 = BooleanModel . objects . get ( pk = b . pk ) #NEWLINE# self . assertTrue ( isinstance ( b2 . bfield , bool ) ) #NEWLINE# self . assertEqual ( b2 . bfield , True ) #NEWLINE# b3 = BooleanModel ( ) #NEWLINE# b3 . bfield = False #NEWLINE# b3 . save ( ) #NEWLINE# b4 = BooleanModel . objects . get ( pk = b3 . pk ) #NEWLINE# self . assertTrue ( isinstance ( b4 . bfield , bool ) ) #NEWLINE# self . assertEqual ( b4 . bfield , False ) #NEWLINE# b = NullBooleanModel ( ) #NEWLINE# b . nbfield = True #NEWLINE# b . save ( ) #NEWLINE# b2 = NullBooleanModel . objects . get ( pk = b . pk ) #NEWLINE# self . assertTrue ( isinstance ( b2 . nbfield , bool ) ) #NEWLINE# self . assertEqual ( b2 . nbfield , True ) #NEWLINE# b3 = NullBooleanModel ( ) #NEWLINE# b3 . nbfield = False #NEWLINE# b3 . save ( ) #NEWLINE# b4 = NullBooleanModel . objects . get ( pk = b3 . pk ) #NEWLINE# self . assertTrue ( isinstance ( b4 . nbfield , bool ) ) #NEWLINE# self . assertEqual ( b4 . nbfield , False ) #NEWLINE# b5 = BooleanModel . objects . all ( ) . extra ( select = { #NEWLINE# #INDENT# 'string_col' : 'string' , #NEWLINE# #UNINDENT# } ) [ 0 ] #NEWLINE# self . assertFalse ( isinstance ( b4 . pk , bool ) )