Beispiel #1
0
    def test_answer_challenge(self):
        self.response.links['up'] = {'url': self.challr.authzr_uri}
        self.response.json.return_value = self.challr.body.to_json()

        chall_response = challenges.DNSResponse(validation=None)

        self.client.answer_challenge(self.challr.body, chall_response)

        # TODO: split here and separate test
        self.assertRaises(errors.UnexpectedUpdate, self.client.answer_challenge,
                          self.challr.body.update(uri='foo'), chall_response)
Beispiel #2
0
 def test_answer_challenge_missing_next(self):
     self.assertRaises(errors.ClientError, self.client.answer_challenge,
                       self.challr.body,
                       challenges.DNSResponse(validation=None))
 def test_answer_challenge_missing_next(self):
     self._mock_post_get()
     self.assertRaises(errors.NetworkError, self.net.answer_challenge,
                       self.challr.body, challenges.DNSResponse())