#NEWLINE# def test_get_for_concrete_models( self ) : #NEWLINE# #INDENT# '\n        Make sure the `for_concrete_models` kwarg correctly works\n        with concrete, proxy and deferred models.\n        ' #NEWLINE# concrete_model_ct = ContentType . objects . get_for_model ( ConcreteModel ) #NEWLINE# cts = ContentType . objects . get_for_models ( ConcreteModel , ProxyModel ) #NEWLINE# self . assertEqual ( cts , { #NEWLINE# #INDENT# ConcreteModel : concrete_model_ct , #NEWLINE# ProxyModel : concrete_model_ct , #NEWLINE# #UNINDENT# } ) #NEWLINE# proxy_model_ct = ContentType . objects . get_for_model ( ProxyModel , for_concrete_model = False ) #NEWLINE# cts = ContentType . objects . get_for_models ( ConcreteModel , ProxyModel , for_concrete_models = False ) #NEWLINE# self . assertEqual ( cts , { #NEWLINE# #INDENT# ConcreteModel : concrete_model_ct , #NEWLINE# ProxyModel : proxy_model_ct , #NEWLINE# #UNINDENT# } ) #NEWLINE# ConcreteModel . objects . create ( name = 'Concrete' ) #NEWLINE# DeferredConcreteModel = ConcreteModel . objects . only ( 'pk' ) . get ( ) . __class__ #NEWLINE# DeferredProxyModel = ProxyModel . objects . only ( 'pk' ) . get ( ) . __class__ #NEWLINE# cts = ContentType . objects . get_for_models ( DeferredConcreteModel , DeferredProxyModel ) #NEWLINE# self . assertEqual ( cts , { #NEWLINE# #INDENT# DeferredConcreteModel : concrete_model_ct , #NEWLINE# DeferredProxyModel : concrete_model_ct , #NEWLINE# #UNINDENT# } ) #NEWLINE# cts = ContentType . objects . get_for_models ( DeferredConcreteModel , DeferredProxyModel , for_concrete_models = False ) #NEWLINE# self . assertEqual ( cts , { #NEWLINE# #INDENT# DeferredConcreteModel : concrete_model_ct , #NEWLINE# DeferredProxyModel : proxy_model_ct , #NEWLINE# #UNINDENT# } )