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