#NEWLINE# def test_version_exists_with_pk_not_owner( self ) : #NEWLINE# #INDENT# ( orig_user , orig_api_key ) = ( self . user , self . api_key ) #NEWLINE# self . user = UserProfile . objects . create ( read_dev_agreement = datetime . now ( ) ) #NEWLINE# self . api_key = self . create_api_key ( self . user , 'bar' ) #NEWLINE# response = self . put ( addon = '@create-version' , version = '1.0' ) #NEWLINE# assert ( response . status_code == 201 ) #NEWLINE# upload = FileUpload . objects . latest ( ) #NEWLINE# response = self . get ( self . url ( '@create-version' , '1.0' , upload . uuid ) ) #NEWLINE# assert ( response . status_code == 200 ) #NEWLINE# assert ( 'processed' in response . data ) #NEWLINE# ( self . user , self . api_key ) = ( orig_user , orig_api_key ) #NEWLINE# self . create_version ( '3.0' ) #NEWLINE# response = self . get ( self . url ( self . guid , '3.0' , upload . uuid ) ) #NEWLINE# assert ( orig_api_key . status_code == 404 ) #NEWLINE# assert ( 'error' in response . data )