Improve the create_review_request functionality for unit tests.

Review Request #10356 — Created Dec. 11, 2018 and submitted — Latest diff uploaded

chipx86
Review Board
release-3.0.x
8cbe104...
reviewboard

This change makes a few improvements in
TestCase.create_review_request(), from functionality to organization
to documentation.

A few arguments (bugs_closed, commit_id, changenum, public) have
been removed in favor of a catch-all **kwargs, which can be used to
set any attribute on the model.

A new argument, depends_on, was added to make it easier to specify
dependencies of a review request when creating the review request.

The rest of the arguments have been reorganized a bit to help keep them
maintainable. Flags affecting the creation operation
(with_local_site, create_repository, publish) are now grouped
together as the first arguments. Following that are the fields for the
models that contain defaults, somewhat organized by purpose/type (IDs,
parent objects, fields, Many-to-Many values).

All arguments have been documented with the modern doc conventions.

Unit tests pass.

Used the new depends_on in an upcoming change.

Loading...