Add a with_diff= option to TestCase.create_diffcommit.

Review Request #2231 — Created Sept. 23, 2021 and updated — Latest diff uploaded

guest7238
Review Board
6129d41...
guest700
`TestCase.create_diffcommit()` takes in diff files and runs them through
the diff parsing and `FileDiff` creation code, which is sometimes
overkill (or completely unwanted) for a test.

This change adds a new `with_diff=` argument to this method, which can
turn off this behavior. When passing `with_diff=False`, the `DiffCommit`
will be created in the database directly, without any additional
processing, and without a `FileDiff`.

Testing Done:
Unit tests pass.

Made use of this new argument in an upcoming change.

Reviewed at https://reviews.reviewboard.org/r/11759/


Loading...