Merge lp:~ttx/launchpad/lp1193389 into lp:launchpad
Proposed by
Thierry Carrez
Status: | Merged |
---|---|
Merged at revision: | 16691 |
Proposed branch: | lp:~ttx/launchpad/lp1193389 |
Merge into: | lp:launchpad |
Diff against target: |
260 lines (+106/-22) 6 files modified
lib/lp/blueprints/configure.zcml (+0/-4) lib/lp/blueprints/interfaces/specification.py (+33/-3) lib/lp/blueprints/interfaces/webservice.py (+5/-1) lib/lp/blueprints/model/specification.py (+6/-3) lib/lp/blueprints/subscribers.py (+0/-11) lib/lp/blueprints/tests/test_webservice.py (+62/-0) |
To merge this branch: | bzr merge lp:~ttx/launchpad/lp1193389 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
William Grant | code | Needs Fixing | |
Review via email: mp+171491@code.launchpad.net |
Commit message
Expose specification goal management in specification API
- Expose proposeGoal, acceptGoal, declineGoal methods and has_accepted_goal attribute
- Under wgrant advice, remove lp.blueprints.
- Add unit tests
Description of the change
Expose specification goal management in specification API
- Expose proposeGoal, acceptGoal, declineGoal methods and has_accepted_goal attribute
- Under wgrant advice, remove lp.blueprints.
- Add unit tests
To post a comment you must log in.
40 + @operation_ parameters( schema= IBugTarget, title=_('Target'),
41 + goal=Reference(
42 + required=False, default=None))
That should probably be something like Reference( schema= ISpecificationT arget, title=_('Series goal')). The indentation is also confusing; I'd say:
@operation_ parameters(
schema= ISpecificationT arget, title=_('Series goal'),
required= False, default=None))
goal=Reference(
Additionally, proposeGoal will currently crash with an AssertionError if you pass a goal that isn't a series. You'll need to replace that with a custom exception decorated with @error_ status( httplib. BAD_REQUEST) to return a 400 Bad Request rather than an OOPS, as is done with NominationError in Bug.addNomination.
121 + def test_goal_ propose_ and_accept( self):
122 + # Create spec
We prefer that tests start with a short comment describing the behaviour that they're testing. I'd perhaps replace "Create spec" with "Webservice clients can propose and accept spec series goals."