#NEWLINE# def test_ssl_server( self ) : #NEWLINE# #INDENT# def test_app( env , start_response ) : #NEWLINE# #INDENT# start_response ( '200 OK' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# return [ 'PONG' ] #NEWLINE# #UNINDENT# fake_ssl_server = nova . wsgi . Server ( 'fake_ssl' , test_app , host = '127.0.0.1' , port = 0 , use_ssl = True ) #NEWLINE# fake_ssl_server . start ( ) #NEWLINE# self . assertNotEqual ( 0 , self . port ) #NEWLINE# response = requests . post ( ( 'https://127.0.0.1:%s/' % fake_ssl_server . port ) , verify = os . path . join ( SSL_CERT_DIR , 'ca.crt' ) , data = 'PING' ) #NEWLINE# self . assertEqual ( response . text , 'PONG' ) #NEWLINE# fake_ssl_server . stop ( ) #NEWLINE# fake_ssl_server . wait ( )