#NEWLINE# def test_keypair_create( self ) : #NEWLINE# #INDENT# body = { #NEWLINE# #INDENT# 'keypair' : { #NEWLINE# #INDENT# 'name' : 'create_test' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# req = webob . Request . blank ( '/v1.1/123/os-keypairs' ) #NEWLINE# req . method = 'POST' #NEWLINE# req . body = json . dumps ( body ) #NEWLINE# req . headers [ 'Content-Type' ] = 'application/json' #NEWLINE# res = req . get_response ( fakes . wsgi_app ( ) ) #NEWLINE# self . assertEqual ( body . status_int , 200 ) #NEWLINE# res_dict = json . loads ( res . body ) #NEWLINE# self . assertTrue ( ( len ( res_dict [ 'keypair' ] [ 'fingerprint' ] ) > 0 ) ) #NEWLINE# self . assertTrue ( ( len ( res_dict [ 'keypair' ] [ 'private_key' ] ) > 0 ) )