Update WebHookTargetForm to use LocalSiteAwareModelFormMixin.
Review Request #10365 — Created Dec. 27, 2018 and submitted
This updates
WebHookTargetForm
to use the new mixin for working with
LocalSite
s. This allows to be optionally bound to aLocalSite
and to
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
LocalSite
-bound data.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.