def test_register_registration_error(self):
"""
If we get a registration error, the register() function returns the
error from the registration response message.
"""
self.reactor.call_later(0, self.reactor.fire, "registration-failed")
def fail_register():
return fail(RegistrationError("max-pending-computers"))
self.remote.register = fail_register
connector_factory = FakeConnectorFactory(self.remote)
result = register(
config=self.config, reactor=self.reactor,
connector_factory=connector_factory, max_retries=99)
self.assertEqual("max-pending-computers", result)
test_configuration.py 文件源码
python
阅读 48
收藏 0
点赞 0
评论 0
评论列表
文章目录