Update WebHookTargetForm to use LocalSiteAwareModelFormMixin.
Review Request #10365 — Created Dec. 27, 2018 and submitted
WebHookTargetFormto use the new mixin for working with
LocalSites. This allows to be optionally bound to a
automatically validate against the site.
The form code itself is now a bit simpler, as it doesn't have to perform
its own validation of any specified repositories. It will also allow
future work on the form without worry about injecting incompatible
New unit tests have been added for the form, since we didn't have any
before. These largely mirror the tests we have for
LocalSiteAwareModelFormMixin, but with data specific to this form.
This helps to ensure that we don't somehow make the form less secure as
changes are made to the mixin or other code.
Unit tests pass.
Added new unit tests for the webhooks API to ensure Local Sites can't change.
Revision 2 (+422 -43)
Checks run (2 succeeded)