def test_cleaning(): lol = TestTemplateModel(another_template='admin/change_form.html') lol.full_clean(exclude=['empty_template', 'template'])
def test_cleaning_error(): lol = TestTemplateModel(another_template='guess.json') with pytest.raises(ValidationError): lol.full_clean(exclude=['empty_template', 'template'])