Ensure Repository.scmtool_id is always set.

Review Request #12334 — Created June 3, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

This change updates code which is instantiating repository objects
(almost entirely in unit tests) to ensure that the new scmtool_id
field is always properly set. Many of these were places where the unit
tests were instantiating the Repository model directly, instead of
using create_repository. I've fixed those up to use the helper
instead.

Ran unit tests.

Diff Revision 2

This is not the most recent revision of the diff. The latest diff is revision 3. See what's changed.

orig
1
2
3

Commits

First Last Summary ID Author
Ensure Repository.scmtool_id is always set.
This change updates code which is instantiating repository objects (almost entirely in unit tests) to ensure that the new `scmtool_id` field is always properly set. Many of these were places where the unit tests were instantiating the `Repository` model directly, instead of using `create_repository`. I've fixed those up to use the helper instead. Testing Done: Ran unit tests.
781797eadc88e90ac8d5ad5ec50e2a59d3b16e0c David Trowbridge
reviewboard/diffviewer/tests/test_forms.py
reviewboard/hostingsvcs/tests/test_assembla.py
reviewboard/hostingsvcs/tests/test_hosting_service_auth_form.py
reviewboard/reviews/management/commands/fill-database.py
reviewboard/reviews/tests/test_counters.py
reviewboard/reviews/tests/test_default_reviewer.py
reviewboard/scmtools/forms.py
reviewboard/scmtools/models.py
reviewboard/scmtools/registry.py
reviewboard/scmtools/tests/test_bazaar.py
reviewboard/scmtools/tests/test_cvs.py
reviewboard/scmtools/tests/test_git.py
reviewboard/scmtools/tests/test_hg.py
reviewboard/scmtools/tests/test_perforce.py
reviewboard/scmtools/tests/test_policy.py
reviewboard/scmtools/tests/test_repository.py
reviewboard/scmtools/tests/test_repository_form.py
reviewboard/scmtools/tests/test_svn.py
reviewboard/scmtools/tests/testcases.py
reviewboard/testing/testcase.py
reviewboard/webapi/resources/repository.py
reviewboard/webapi/tests/test_repository.py
Loading...