def test_store_unexpected_response(self):
"""
When the wrapped certificate store returns something other than None,
an error should be raised as this is unexpected.
"""
class BrokenCertificateStore(object):
def store(self, server_name, pem_objects):
# Return something other than None
return succeed('foo')
mlb_store = MlbCertificateStore(BrokenCertificateStore(), self.client)
d = mlb_store.store('example.com', EXAMPLE_PEM_OBJECTS)
assert_that(d, failed(WithErrorTypeAndMessage(
RuntimeError,
"Wrapped certificate store returned something non-None. Don't "
"know what to do with 'foo'.")))
test_acme_util.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录