示例#1
0
    def test_sends_valid_signature(self):

        # Generate shoppingcart signatures
        post_params = sign(self.client_post_params)

        # Get the POST params that the view would send back to us
        resp_params = PaymentFakeView.response_post_params(post_params)

        # Check that the client accepts these
        try:
            verify_signatures(resp_params)

        except CCProcessorSignatureException:
            self.fail("Client rejected signatures.")
示例#2
0
    def test_sends_valid_signature(self):

        # Generate shoppingcart signatures
        post_params = sign(self.CLIENT_POST_PARAMS)

        # Get the POST params that the view would send back to us
        resp_params = PaymentFakeView.response_post_params(post_params)

        # Check that the client accepts these
        try:
            verify_signatures(resp_params)

        except CCProcessorSignatureException:
            self.fail("Client rejected signatures.")