'In some cases such as with SAN certificates, the certificate can cover more
than a single domain. In that case, we want to be able to specify the common
name for the certificate/key.'

def test_create_certificate_with_different_common_name(self):

    body = {u'certificate': self.autotest_example_com_cert, u'key': self.key, u'common_name': u'foo.example.com'}
    response = self.client.post(self.url, json.dumps(body), content_type=u'application/json', HTTP_AUTHORIZATION=u'token    {}'.format(self.token))
    self.assertEqual(response.status_code, 201)
    self.assertEqual(response.data[u'common_name'], u'foo.example.com')
