#NEWLINE# def test_get_certificate_screens_data( self ) : #NEWLINE# #INDENT# '\n        When a user retrieves a certificate, only the common name and expiry date should be\n        displayed.\n        ' #NEWLINE# body = { #NEWLINE# #INDENT# 'certificate' : self . autotest_example_com_cert , #NEWLINE# 'key' : self . key , #NEWLINE# #UNINDENT# } #NEWLINE# self . client . post ( self . url , json . dumps ( body ) , content_type = 'application/json' , HTTP_AUTHORIZATION = 'token {}' . format ( self . token ) ) #NEWLINE# response = self . client . get ( '{}/{}' . format ( self . url , 'autotest.example.com' ) , HTTP_AUTHORIZATION = 'token {}' . format ( self . token ) ) #NEWLINE# expected = { #NEWLINE# #INDENT# 'common_name' : 'autotest.example.com' , #NEWLINE# 'expires' : '2016-03-05T17:14:27UTC' , #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , value ) in expected . items ( ) : #NEWLINE# #INDENT# self . assertEqual ( response . data [ key ] , value )