Fix the issue of publishing from web API without reviewers or groups specified.
Review Request #9210 — Created Sept. 23, 2017 and submitted — Latest diff uploaded
When creating a new review request with no reviewer or groups
assigned, attempting to publish it with PUT will be sucessful.
However, it shouldn't allow that as review requests must have a
reviewer. The issue is solved by adding conditions to validate the
review draft on the server.
Added a unit test, which passes (along with all other tests).
- Created a draft test review that don't have a reviewer/group name.
- Ran it using this command ./tests/runtests.py
reviewboard.reviews.tests.test_review_request_draft - This will raise a publishingError since there isn't reviewer.
- Fixed other unit tests that failed because of the change.
Diff Revision 15
This is not the most recent revision of the diff. The latest diff is revision 21. See what's changed.
orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
reviewboard/reviews/models/review_request_draft.py |
---|
reviewboard/reviews/tests/test_review_request.py |
---|
reviewboard/reviews/tests/test_review_request_draft.py |
---|