#NEWLINE# def test_version_exists_with_pk( self ) : #NEWLINE# #INDENT# with mock . patch ( 'olympia.devhub.tasks.Version.from_upload' ) : #NEWLINE# #INDENT# self . create_version ( '3.0' ) #NEWLINE# #UNINDENT# upload = FileUpload . objects . latest ( ) #NEWLINE# upload . update ( created = ( datetime . today ( ) - timedelta ( hours = 1 ) ) ) #NEWLINE# self . create_version ( '3.0' ) #NEWLINE# newer_upload = FileUpload . objects . latest ( ) #NEWLINE# assert ( newer_upload != upload ) #NEWLINE# response = self . get ( self . url ( self . guid , '3.0' , upload . uuid ) ) #NEWLINE# assert ( response . status_code == 200 ) #NEWLINE# assert ( response . data [ 'pk' ] == upload . uuid ) #NEWLINE# assert ( 'processed' in response . data )