def test_json_without_optionals(self):
        del self.jmsg_from['contact']
        del self.jmsg_to['contact']

        from letsencrypt.acme.messages import AuthorizationRequest
        msg = AuthorizationRequest.from_json(self.jmsg_from)

        self.assertEqual(msg.contact, ())
        self.assertEqual(self.jmsg_to, msg.to_json())
    def test_json_without_optionals(self):
        del self.jmsg_from['contact']
        del self.jmsg_to['contact']

        from letsencrypt.acme.messages import AuthorizationRequest
        msg = AuthorizationRequest.from_json(self.jmsg_from)

        self.assertEqual(msg.contact, ())
        self.assertEqual(self.jmsg_to, msg.to_partial_json())
 def test_from_json(self):
     from letsencrypt.acme.messages import AuthorizationRequest
     self.assertEqual(
         self.msg, AuthorizationRequest.from_json(self.jmsg_from))
 def test_from_json(self):
     from letsencrypt.acme.messages import AuthorizationRequest
     self.assertEqual(
         self.msg, AuthorizationRequest.from_json(self.jmsg_from))