-
-
We should have unit tests for POSTing/PUTing with:
1) Bad change IDs
2) Bad review IDs
3) Bad statusesAlso, can you run
./contrib/internal/webapi-lint.py
and make sure this doesn't introduce new warnings? -
reviewboard/testing/testcase.py (Diff revision 1) We should have a docstring here. (I know the others don't, but that's something we need to do at some point too.)
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) Since this is public docs, this should be greatly fleshed out to cover more about what the resource is about. Purpose of status updates, how you'd use the resource, etc. would be good.
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) Can we add some filtering options for timestamps, change description IDs, states, and service IDs, and document those? (This would go in
get_queryset
, but should be documented here.) -
reviewboard/webapi/resources/status_update.py (Diff revision 1) Here and in other HTTP handler methods, we should use "Returns." While "Return" is appropriate for codebase docs, API docs aren't using it.
-
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) This should be fleshed out to go into more details about usage. For instance, indicating when a change/review ID would be provided, ordering of operations.
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) For consistency with the other resources, can we make this:
return 201, { self.item_result_key: status_update, }
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) This needs a docstring for the public API docs.
-
-
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) This can use the pattern other resources use:
for field_name in ('service_id', 'summary', 'description', ...): if field_name in kwargs: setattr(status_update, field_name, kwargs[field_name])
-
reviewboard/webapi/resources/status_update.py (Diff revision 1) This needs to check and return a suitable error.
-
Status Updates part 6: Add resource for status updates.
Review Request #8407 — Created Sept. 18, 2016 and submitted
This change adds an API endpoint for creating and manipulating status updates.
This is intended to be used by consumers who want to create status updates from
a purely third-party source without writing an extension.
Ran unit tests.
Description | From | Last Updated |
---|---|---|
We should have unit tests for POSTing/PUTing with: 1) Bad change IDs 2) Bad review IDs 3) Bad statuses Also, … |
chipx86 | |
We should have a docstring here. (I know the others don't, but that's something we need to do at some … |
chipx86 | |
Since this is public docs, this should be greatly fleshed out to cover more about what the resource is about. … |
chipx86 | |
Can we add some filtering options for timestamps, change description IDs, states, and service IDs, and document those? (This would … |
chipx86 | |
Here and in other HTTP handler methods, we should use "Returns." While "Return" is appropriate for codebase docs, API docs … |
chipx86 | |
Missing Args and Returns. |
chipx86 | |
This should be fleshed out to go into more details about usage. For instance, indicating when a change/review ID would … |
chipx86 | |
For consistency with the other resources, can we make this: return 201, { self.item_result_key: status_update, } |
chipx86 | |
This needs a docstring for the public API docs. |
chipx86 | |
Same comment as above. |
chipx86 | |
Missing docstring. |
chipx86 | |
This can use the pattern other resources use: for field_name in ('service_id', 'summary', 'description', ...): if field_name in kwargs: setattr(status_update, … |
chipx86 | |
This needs to check and return a suitable error. |
chipx86 | |
Needs docs. |
chipx86 | |
User or unicode |
brennie | |
In part 5, you use done-success and done-failure in the StatusUpdate model. |
brennie | |
Missing Returns |
chipx86 |
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+805 -19) |
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
Change Summary:
Fix a couple small bugs that I encountered trying to actually use this:
- The owning user wasn't properly assigned.
- The accepted values for the state incorrectly used underscores instead of hyphens.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+806 -19) |
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
-
-
-
reviewboard/webapi/resources/status_update.py (Diff revision 3) In part 5, you use
done-success
anddone-failure
in theStatusUpdate
model.
Change Summary:
Fix a docstring.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 4 (+806 -19) |
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py
Change Summary:
Fix a docstring.
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 5 (+810 -19) |
-
Tool: Pyflakes Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py Tool: PEP8 Style Checker Processed Files: reviewboard/testing/testcase.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/tests/test_review.py reviewboard/webapi/resources/review_request.py reviewboard/webapi/tests/test_status_update.py reviewboard/webapi/tests/urls.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/status_update.py