#NEWLINE# @ skipUnlessDBFeature ( 'supports_tablespaces' ) #NEWLINE# def test_tablespace_for_indexed_field( self ) : #NEWLINE# #INDENT# sql = sql_for_table ( Article ) . lower ( ) #NEWLINE# if settings . DEFAULT_INDEX_TABLESPACE : #NEWLINE# #INDENT# self . assertNumContains ( sql , 'tbl_tbsp' , 1 ) #NEWLINE# self . assertNumContains ( sql , settings . DEFAULT_INDEX_TABLESPACE , 2 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertNumContains ( sql , 'tbl_tbsp' , 3 ) #NEWLINE# #UNINDENT# self . assertNumContains ( sql , 'idx_tbsp' , 1 )