コード例 #1
0
ファイル: tests.py プロジェクト: ace0/pythia
    def runClientEval(self):
        """
        Runs the client-side eval() and returns the resulting values
        after they've been unwrapped.
        """
        # Query the eval function
        response = self.client.get(self.standardUrl)
        d = self.parse(response)

        # Unwrap the results.
        return bls.unwrapY(d["y"]), bls.unwrapP(d["p"])
コード例 #2
0
ファイル: tests.py プロジェクト: ace0/pythia
    def testEvalSimple(self):
        """
        Simple test of the eval function
        """
        # Query the eval function
        response = self.client.get(self.standardUrl)
        d = self.parse(response)

        # Verify that we got a response of the correct type
        self.assertTrue( "y" in d )
        y = bls.unwrapY(d["y"])
        p = bls .unwrapP(d["p"])
        self.assertTrue(isinstance(y, G1Element))
        self.assertTrue(isinstance(p, G2Element))