@patch.object(forms.SanitizeHTMLMixin, 'sanitize_html')
    def test_form_cleans_html(self, mock):
        form = forms.UserForm({'biography': TEST_HTML}, instance=self.user1)

        # The form will not be valid, but this will still call our cleaner
        form.is_valid()

        mock.assert_called_once_with(TEST_HTML)
Test that text in form is cleaned
dataset/ETHPy150Open ofa/connect/open_connect/accounts/tests/test_forms.py/UserFormTest.test_form_cleans_html