def test_identify(self):
        target = "example.com"
        fakeCert = makeCert("fake certificate")

        class FakeStorage(object):
            def getPrivateCertificate(cs, subject):
                self.assertEqual(subject, target)
                return fakeCert
        class FakeService(object):
            certificateStorage = FakeStorage()

        q = Q2Q()
        q.service = FakeService()

        d = callResponder(q, Identify, subject=Q2QAddress(target))
        response = self.successResultOf(d)
        self.assertEqual(response, {'certificate': fakeCert})
        self.assertFalse(hasattr(response['certificate'], 'privateKey'))
A presence server responds to Identify messages with the cert
dataset/ETHPy150Open twisted/vertex/vertex/test/test_identity.py/IdentityTests.test_identify