#NEWLINE# def test_adding_small_integer( self ) : #NEWLINE# #INDENT# blueprint = Blueprint ( 'users' ) #NEWLINE# blueprint . small_integer ( 'foo' ) #NEWLINE# statements = blueprint . to_sql ( self . get_connection ( ) , self . get_grammar ( ) ) #NEWLINE# self . assertEqual ( 1 , len ( statements ) ) #NEWLINE# self . assertEqual ( 'ALTER TABLE "users" ADD COLUMN "foo" SMALLINT NOT NULL' , statements [ 0 ] ) #NEWLINE# blueprint = Blueprint ( 'users' ) #NEWLINE# blueprint . small_integer ( 'foo' , True ) #NEWLINE# statements = blueprint . to_sql ( self . get_connection ( ) , self . get_grammar ( ) ) #NEWLINE# self . assertEqual ( 1 , len ( statements ) ) #NEWLINE# self . assertEqual ( 'ALTER TABLE "users" ADD COLUMN "foo" SMALLSERIAL PRIMARY KEY NOT NULL' , statements [ 0 ] )