-
-
Manually tested with the following shell script: (see attached test-issue2635.sh) Visual inspect of results match expected output (on a database with 59 review-requests, 1 of which has 2 ship-its, 2 of which have 1 ship-it each, the rest having no ship-its) #!/bin/bash #1: ship-it=0 # expecting only results with shipit_count == 0 curl -H "Accept: application/json" -v -G "http://0.0.0.0:8080/api/review-requests/?ship-it=0" > result_0 #2: ship-it=1 # expecting only results with shipit_count == 1 curl -H "Accept: application/json" -v -G "http://0.0.0.0:8080/api/review-requests/?ship-it=1" > result_1 #3: no ship-it defined # expecting all review-requests curl -H "Accept: application/json" -v -G "http://0.0.0.0:8080/api/review-requests/" > result_normal #4: improperly defined ship-it param 1 # expecting all review-requests curl -H "Accept: application/json" -v -G "http://0.0.0.0:8080/api/review-requests/?sh%20ip-it=0" > result_err_1 #5: improperly defined ship-it param 2 # expecting all review-requests curl -H "Accept: application/json" -v -G "http://0.0.0.0:8080/api/review-requests/?ship-it=55" > result_err_2 #6: improperly defined ship-it param 3 # expecting all review-requests curl -H "Accept: application/json" -v -G "http://0.0.0.0:8080/api/review-requests/?ship-it=okay" > result_err_3
-
typo in the comments for the #2 test: it should read: # expecting only results with shipit_count > 0
-
Could you add these cases in the test suite? See ReviewRequestResourceTests in reviewboard/webapi/tests.py
-
-
Fixed tests + fixture for issue2635
Review Request #3371 — Created Sept. 28, 2012 and submitted
Information | |
---|---|
slchen | |
Review Board | |
release.1.6.x | |
Reviewers | |
reviewboard | |
Fixed tests + fixture for issue2635 - Bug fix for issue 2635 is broken down into 2 parts - Part 1 of this fix is made in resources.py in an earlier commit - Part 2 of this fix is made in the current commit: affected files are - reviewboard/reviews/fixtures/test_reviewrequests.json - reviewboard/webapi/tests.py - Had run into a strange error: "DoesNotExist: LocalSite matching query does not exist.", which was solved by decorating the ship_it tests with @add_fixtures(['test_site']) - In test_reviewrequests.json, corrected the shipit_count of a review-request with pk=2 from 0 to 1, as there is a review associated with that review-request with ship-it set to True Merge branch 'release-1.6.x' into issue2635-slchen Merge branch 'release-1.6.x' into issue2635-slchen Fixed Issue: 2635 - "shipit=0" issue - (release.1.6.x) - see http://code.google.com/p/reviewboard/issues/detail?id=2635 for full details - replaced (removed) exclude_q infrastructure for filtering review-requests based on ship-out counts - instead uses existing q infrastructure for filtering (similar to how it is used for the other search parameters); fixed the filtering parameter for requests from "reviews__shipit" to "shipit_count"
Manual testing on local environment for release.1.6.x
SL
Change Summary:
- Added part 2 of the fix: updated tests.py and test_reviewrequests.json appropriately - Updated description of review-request to detail the changes
Summary: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+10 -10) |