#NEWLINE# def test_get_project_local_template_render( self ) : #NEWLINE# #INDENT# self . app . projects . add_metadata ( { #NEWLINE# #INDENT# 'name' : 'foo' , #NEWLINE# 'version' : '1.0' , #NEWLINE# '_filename' : 'foo-1.0.tar.gz' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . app . projects . add_metadata ( { #NEWLINE# #INDENT# 'name' : 'foo' , #NEWLINE# 'version' : '1.1' , #NEWLINE# '_filename' : 'foo-1.1.tar.gz' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . app . projects . add_metadata ( { #NEWLINE# #INDENT# 'name' : 'foo' , #NEWLINE# 'version' : '1.0.dev1' , #NEWLINE# '_filename' : 'foo-1.0.dev1.tar.gz' , #NEWLINE# #UNINDENT# } ) #NEWLINE# result = self . client . get ( '/simple/foo' ) #NEWLINE# eq_ ( self . status_code , codes . ok ) #NEWLINE# iter_ = iter_version_links ( result . data , 'foo' ) #NEWLINE# eq_ ( iter_ . next ( ) , ( 'foo-1.1.tar.gz' , '/local/foo-1.1.tar.gz' ) ) #NEWLINE# eq_ ( iter_ . next ( ) , ( 'foo-1.0.tar.gz' , '/local/foo-1.0.tar.gz' ) ) #NEWLINE# eq_ ( iter_ . next ( ) , ( 'foo-1.0.dev1.tar.gz' , '/local/foo-1.0.dev1.tar.gz' ) ) #NEWLINE# with assert_raises ( StopIteration ) : #NEWLINE# #INDENT# iter_ . next ( )