Exemplo n.º 1
0
 def test_objectinformationobject_form_clean_does_not_throw_exception_if_besluit_is_given(
     self, ):
     form = ObjectInformatieObjectForm()
     form.cleaned_data = {"object_type": ObjectTypes.besluit, "_besluit": 1}
     try:
         form.clean()
     except forms.ValidationError:
         self.fail(
             "Exception was raised in clean function when it should not have"
         )
Exemplo n.º 2
0
 def test_objectinformationobject_form_clean_does_not_throw_exception_if_zaak_url_is_given(
     self, ):
     form = ObjectInformatieObjectForm()
     form.cleaned_data = {
         "object_type": ObjectTypes.zaak,
         "_zaak_url": "https://testserver",
     }
     try:
         form.clean()
     except forms.ValidationError:
         self.fail(
             "Exception was raised in clean function when it should not have"
         )
Exemplo n.º 3
0
 def test_objectinformationobject_form_clean_throws_exception_if_neither_besluit_or_besluit_url_is_given(
     self, ):
     form = ObjectInformatieObjectForm()
     form.cleaned_data = {"object_type": ObjectTypes.besluit}
     with self.assertRaises(forms.ValidationError):
         form.clean()