'When a user retrieves a certificate, only the common name and expiry date should be
displayed.'

def test_get_certificate_screens_data(self):

    body = {u'certificate': self.autotest_example_com_cert, u'key': self.key}
    self.client.post(self.url, json.dumps(body), content_type=u'application/json', HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    response = self.client.get(u'{}/{}'.format(self.url, u'autotest.example.com'), HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    expected = {u'common_name': u'autotest.example.com', u'expires': u'2016-03-05T17:14:27UTC'}
    for (key, value) in expected.items():
        self.assertEqual(response.data[key], value)
