#NEWLINE# def test_raw( self ) : #NEWLINE# #INDENT# 'test the raw() method across databases' #NEWLINE# dive = Book . objects . using ( 'other' ) . create ( title = 'Dive into Python' , published = datetime . date ( 2009 , 5 , 4 ) ) #NEWLINE# val = Book . objects . db_manager ( 'other' ) . raw ( 'SELECT id FROM multiple_database_book' ) #NEWLINE# self . assertEqual ( map ( ( lambda o : o . pk ) , val ) , [ dive . pk ] ) #NEWLINE# val = Book . objects . raw ( 'SELECT id FROM multiple_database_book' ) . using ( 'other' ) #NEWLINE# self . assertEqual ( map ( ( lambda o : o . pk ) , val ) , [ dive . pk ] )