Merge lp://staging/~benji/landscape-client/better-self-signed-cert-ux-3 into lp://staging/~landscape/landscape-client/trunk
Status: | Merged |
---|---|
Approved by: | Benji York |
Approved revision: | 831 |
Merged at revision: | 812 |
Proposed branch: | lp://staging/~benji/landscape-client/better-self-signed-cert-ux-3 |
Merge into: | lp://staging/~landscape/landscape-client/trunk |
Diff against target: |
1345 lines (+604/-570) 4 files modified
landscape/broker/amp.py (+15/-0) landscape/configuration.py (+108/-90) landscape/tests/helpers.py (+1/-0) landscape/tests/test_configuration.py (+480/-480) |
To merge this branch: | bzr merge lp://staging/~benji/landscape-client/better-self-signed-cert-ux-3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Björn Tillenius (community) | Approve | ||
Chris Glass (community) | Abstain | ||
Данило Шеган (community) | Approve | ||
Review via email: mp+250841@code.staging.launchpad.net |
Commit message
This branch is a pure refactoring of the way the client configuration
communicates so as to separate the UI and network code in preparation
for better SSL error handling and user interaction.
Tests were then able to be improved -- but not as far as we would like.
Notes from Chris:
Most of the code breaks out nested function declaration to make them
easier to test, using functools.partial to keep the invocation sane in a
twisted context (test them "flat", use functools to pass closures to
event handlers).
We used manual stubs instead of mocks for readability and personal
preference [of both of us].
Description of the change
This branch is a pure refactoring of the way the client configuration communicates so as to separate the UI and network code in preparation for better SSL error handling and user interaction.
Tests were then able to be improved -- but not as far as we would like.
Notes from Chris:
Most of the code breaks out nested function declaration to make them easier to test, using functools.partial to keep the invocation sane in a twisted context (test them "flat", use functools to pass closures to event handlers).
We used manual stubs instead of mocks for readability and personal preference (of both of us).
Looks good, and seems to work.
The merge description is wrong however - this branch "only" refactors the current code to make it easier to grok and test, but there is currently no functional improvement (that should come in a subsequent branch).
Note (can be used in the change description):
Most of the code breaks out nested function declaration to make them easier to test, using functools.partial to keep the invocation sane in a twisted context (test them "flat", use functools to pass closures to event handlers).
Note 2:
We used manual stubs instead of mocks for readability and personal preference (of both of us).
I'll comment again when I will have performed actual manual tests (give me a couple of hours :) )