Cache instance attributes could always use a documentation line on
what's being cached.
hook.py line 269
self._relation_cache = None
[1]
set_value/set
return fail(NotImplementedError(
"Cannot change settings in broken relation"))
That doesn't seem like the appropriate error in this
context. Something more specific to the problem at hand seems
appropriate, ie. RelationBrokenContextError
[2] pep8 nags, trailing newline at EOF, over 80 (unrelated to diff) in hook.py
Nice work, some minors.
[0]
Cache instance attributes could always use a documentation line on
what's being cached.
hook.py line 269
self._relation_ cache = None
[1]
set_value/set
return fail(NotImpleme ntedError(
"Cannot change settings in broken relation"))
That doesn't seem like the appropriate error in this ontextError
context. Something more specific to the problem at hand seems
appropriate, ie. RelationBrokenC
[2] pep8 nags, trailing newline at EOF, over 80 (unrelated to diff) in hook.py
unit_state = yield service_ state_manager. get_unit_ state(self. _unit_name)
[3]
seems like the mixin here should be merged into hookcontexttest base,
all the tests have the same pair of base classes.
HookContextTest (HookContextTes tBase, CommonHookConte xtTestsMixin) :