def test_parent_mismatch(self, parent, has_parent): req = Request(command="bar", parent=parent, has_parent=has_parent) with pytest.raises(ModelValidationError): req.clean()
def test_set_has_parent(self, parent, has_parent): req = Request(command="bar", parent=parent) req.clean() assert req.has_parent is has_parent