'A certificate written by ``UserCredential.initialize`` has the
subject common name "user-{user}" where {user} is the username
supplied during the certificate\'s creation.'

def test_certificate_subject_username(self):

    cert = self.credential.credential.certificate.original
    subject = cert.get_subject()
    self.assertEqual(subject.CN, u'user-{user}'.format(user=self.credential.username))
