#NEWLINE# def test_swappable( self ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# old_app_models = copy . deepcopy ( cache . app_models ) #NEWLINE# old_app_store = copy . deepcopy ( cache . app_store ) #NEWLINE# settings . TEST_SWAPPABLE_MODEL = 'proxy_models.AlternateModel' #NEWLINE# class SwappableModel ( models . Model ) : #NEWLINE# #INDENT# class Meta ( ) : #NEWLINE# #INDENT# swappable = 'TEST_SWAPPABLE_MODEL' #NEWLINE# #UNINDENT# #UNINDENT# class AlternateModel ( models . Model ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# with self . assertRaises ( TypeError ) : #NEWLINE# #INDENT# class ProxyModel ( SwappableModel ) : #NEWLINE# #INDENT# class Meta ( ) : #NEWLINE# #INDENT# proxy = True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# del settings . TEST_SWAPPABLE_MODEL #NEWLINE# cache . app_models = old_app_store #NEWLINE# cache . app_store = old_app_store