コード例 #1
0
class RegistrationResourceTest(unittest.TestCase):
    """Tests for acme.messages.RegistrationResource."""

    def setUp(self):
        from acme.messages import RegistrationResource
        self.regr = RegistrationResource(
            body=mock.sentinel.body, uri=mock.sentinel.uri,
            terms_of_service=mock.sentinel.terms_of_service)

    def test_to_partial_json(self):
        self.assertEqual(self.regr.to_json(), {
            'body': mock.sentinel.body,
            'uri': mock.sentinel.uri,
            'terms_of_service': mock.sentinel.terms_of_service,
        })
コード例 #2
0
 def setUp(self):
     from acme.messages import RegistrationResource
     self.regr = RegistrationResource(
         body=mock.sentinel.body, uri=mock.sentinel.uri,
         new_authzr_uri=mock.sentinel.new_authzr_uri,
         terms_of_service=mock.sentinel.terms_of_service)
コード例 #3
0
ファイル: messages_test.py プロジェクト: yeruicsy/certbot
 def setUp(self):
     from acme.messages import RegistrationResource
     self.regr = RegistrationResource(
         body=mock.sentinel.body,
         uri=mock.sentinel.uri,
         terms_of_service=mock.sentinel.terms_of_service)