Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(5)  |  Derive(1)  |  Import(5)

src/p/y/pyPerspectives-HEAD/Convergence/Protocol.py   pyPerspectives(Download)
class Protocol(Perspectives.Protocol):
    """Convergence Protocol"""
 
    _str = "Convergence"
 

src/p/y/pyPerspectives-HEAD/unittests/Protocol_test.py   pyPerspectives(Download)
    def _create_procotol(self):
        from Perspectives import Protocol
        notaries = testutils.test_notaries()
        service = testutils.test_service()
        # Choose notary that signed our test responses
        notary = notaries.find_notary("cmu.ron.lcs.mit.edu")
        return Protocol(notary, service)
    def test_init(self):
        """Test basic Protocol creation"""
        from Perspectives import Protocol
        notaries = testutils.test_notaries()
        service = testutils.test_service()
        protocol = Protocol(notaries[0], service)
    def test_response_verify(self):
        """Test verification of response"""
        from Perspectives import NotaryResponse
        from Perspectives import Protocol
        from Perspectives import Service, ServiceType

src/p/y/pyPerspectives-HEAD/unittests/testutils.py   pyPerspectives(Download)
def create_NotaryResponse():
    """Return a NotaryResponse instance"""
    from Perspectives import NotaryResponse
    from Perspectives import Protocol
    from Perspectives import Service, ServiceType
                      443,
                      ServiceType.SSL)
    protocol = Protocol(notary, service)
    response_string = load_response("response.1")
    response = protocol.parse_response(response_string)