#NEWLINE# @ skipUnlessDBFeature ( 'can_introspect_foreign_keys' ) #NEWLINE# def test_get_key_columns( self ) : #NEWLINE# #INDENT# with connection . cursor ( ) as cursor : #NEWLINE# #INDENT# key_columns = connection . introspection . get_key_columns ( self , Article . _meta . db_table ) #NEWLINE# #UNINDENT# self . assertEqual ( set ( key_columns ) , { ( 'reporter_id' , Reporter . _meta . db_table , 'id' ) , ( 'response_to_id' , Article . _meta . db_table , 'id' ) } )