#NEWLINE# def test_join( self ) : #NEWLINE# #INDENT# metadata = MetaData ( ) #NEWLINE# t1 = Table ( 't1' , metadata , Column ( 'col1' , Integer ) ) #NEWLINE# t2 = Table ( 't2' , metadata , Column ( 'col1' , Integer ) , Column ( 't1col1' , Integer , ForeignKey ( 't1.col1' ) ) ) #NEWLINE# self . assert_compile ( t2 . join ( t1 ) . select ( ) , 'SELECT t2.col1, t2.t1col1, t1.col1 FROM t2 JOIN t1 ON t1.col1 = t2.t1col1' ) #NEWLINE# metadata = MetaData ( ) #NEWLINE# t1 = Table ( 't1' , metadata , Column ( 'col1' , Integer , quote = True ) , quote = True ) #NEWLINE# t2 = Table ( 't2' , metadata , Column ( 'col1' , Integer , quote = True ) , Column ( 't1col1' , Integer , ForeignKey ( 't1.col1' ) , quote = True ) , quote = True ) #NEWLINE# self . assert_compile ( t2 . join ( t1 ) . select ( ) , 'SELECT "t2"."col1", "t2"."t1col1", "t1"."col1" FROM "t2" JOIN "t1" ON "t1"."col1" = "t2"."t1col1"' ) #NEWLINE# metadata = MetaData ( ) #NEWLINE# t1 = Table ( 'T1' , metadata , Column ( 'Col1' , Integer ) ) #NEWLINE# t2 = Table ( 'T2' , metadata , Column ( 'Col1' , Integer ) , Column ( 'T1Col1' , Integer , ForeignKey ( 'T1.Col1' ) ) ) #NEWLINE# self . assert_compile ( t2 . join ( t1 ) . select ( ) , 'SELECT "T2"."Col1", "T2"."T1Col1", "T1"."Col1" FROM "T2" JOIN "T1" ON "T1"."Col1" = "T2"."T1Col1"' ) #NEWLINE# metadata = MetaData ( ) #NEWLINE# t1 = Table ( 'T1' , metadata , Column ( 'Col1' , Integer , quote = False ) , quote = False ) #NEWLINE# t2 = Table ( 'T2' , metadata , Column ( 'Col1' , Integer , quote = False ) , Column ( 'T1Col1' , Integer , ForeignKey ( 'T1.Col1' ) , quote = False ) , quote = False ) #NEWLINE# self . assert_compile ( t2 . join ( t1 ) . select ( ) , 'SELECT T2.Col1, T2.T1Col1, T1.Col1 FROM T2 JOIN T1 ON T1.Col1 = T2.T1Col1' )