#NEWLINE# def test_mixin( self ) : #NEWLINE# #INDENT# 'Test that mixins from abstract classes work and also proxy models.' #NEWLINE# test_account = Account ( name = ( 'sf_test account' + uid ) , description = 'experimental' ) #NEWLINE# test_account . save ( ) #NEWLINE# test_account = refresh ( test_account ) #NEWLINE# test_contact = Contact ( first_name = 'sf_test' , last_name = 'my' , account = test_account ) #NEWLINE# test_contact . save ( ) #NEWLINE# try : #NEWLINE# #INDENT# test_contact = refresh ( test_contact ) #NEWLINE# self . assertEqual ( test_contact . account . owner . username , current_user ) #NEWLINE# contacts = Contact . objects . filter ( account__name = ( 'sf_test account' + uid ) ) #NEWLINE# self . assertGreaterEqual ( len ( contacts ) , 1 ) #NEWLINE# repr ( test_contact . __dict__ ) #NEWLINE# repr ( test_account . __dict__ ) #NEWLINE# self . assertEqual ( Proxy2Contact . objects . get ( pk = test_contact . pk ) . pk , test_contact . pk ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# test_contact . delete ( ) #NEWLINE# test_account . delete ( )