#NEWLINE# def test_objects_with_same_object_id( self ) : #NEWLINE# #INDENT# model1 = ModelWithSlugField2 ( slug = 'test' ) #NEWLINE# model1 . save ( ) #NEWLINE# model2 = UserProfile ( description = 'Profile for new user' , url = 'http://www.yahoo.com' , user = User . objects . get ( username = 'user1' ) ) #NEWLINE# model2 . save ( ) #NEWLINE# self . assertRaises ( MultipleObjectsReturned , ModeratedObject . objects . get , object_pk = model2 . pk ) #NEWLINE# moderated_obj1 = ModeratedObject . objects . get_for_instance ( model1 ) #NEWLINE# moderated_obj2 = ModeratedObject . objects . get_for_instance ( model2 ) #NEWLINE# self . assertEqual ( repr ( self ) , '<ModeratedObject: ModelWithSlugField2 object>' ) #NEWLINE# self . assertEqual ( repr ( moderated_obj2 ) , '<ModeratedObject: user1 - http://www.yahoo.com>' )