#NEWLINE# def test_create_certificate_with_different_common_name( self ) : #NEWLINE# #INDENT# '\n        In some cases such as with SAN certificates, the certificate can cover more\n        than a single domain. In that case, we want to be able to specify the common\n        name for the certificate/key.\n        ' #NEWLINE# body = { #NEWLINE# #INDENT# 'certificate' : self . autotest_example_com_cert , #NEWLINE# 'key' : self . key , #NEWLINE# 'common_name' : 'foo.example.com' , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( self . url , json . dumps ( body ) , content_type = 'application/json' , HTTP_AUTHORIZATION = 'token {}' . format ( self . token ) ) #NEWLINE# self . assertEqual ( response . status_code , 201 ) #NEWLINE# self . assertEqual ( response . data [ 'common_name' ] , 'foo.example.com' )