def replace_resource(self, key, resource):
return self._init_resource(key, resource)<EOL>
Replace a Resource with another. Usually this is a bad
idea but is often done in testing to replace a Resource
with a mock version. It's also used for practical
reasons if you need to swap out resources for different
framework implementations (ex: Greenlet version vs
threaded)

:param key: Name of resource
:param resource: Resource