def testRequestRegrant(self): resources = [] def callback(req, res): resources.insert(0, res) req = rm.Request("namespace", "name", rm.EXCLUSIVE, callback) req.grant() self.assertRaises(rm.RequestAlreadyProcessedError, req.grant)
def testRequestRegrant(self, tmp_manager): resources = [] def callback(req, res): resources.insert(0, res) req = rm.Request("namespace", "name", rm.EXCLUSIVE, callback) req.grant() with pytest.raises(rm.RequestAlreadyProcessedError): req.grant()