#NEWLINE# def test_adding_string( self ) : #NEWLINE# #INDENT# blueprint = Blueprint ( 'users' ) #NEWLINE# blueprint . string ( '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" VARCHAR(255) NOT NULL' , statements [ 0 ] ) #NEWLINE# blueprint = Blueprint ( 'users' ) #NEWLINE# blueprint . string ( 'foo' , 100 ) #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" VARCHAR(100) NOT NULL' , statements [ 0 ] ) #NEWLINE# blueprint = Blueprint ( 'users' ) #NEWLINE# blueprint . string ( 'foo' , 100 ) . nullable ( ) . default ( 'bar' ) #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" VARCHAR(100) NULL DEFAULT \'bar\'' , statements [ 0 ] )