def test_bulk_nosuchobject(self): engine = nssct.engine.BulkEngine(self.backend) # non-bulk res = engine.get((1, 2, 3, 4)) engine.step() self.assertTrue(res.done()) self.assertRaises(nssct.engine.NoSuchObjectError, res.result) # need to do two queries to trigger bulk mode res1 = engine.get((1, 2, 3, 4)) res2 = engine.get((1, 2, 3, 4)) engine.step() self.assertTrue(res1.done()) self.assertRaises(nssct.engine.NoSuchObjectError, res1.result)
def test_simple_nosuchobject(self): engine = nssct.engine.SimpleEngine(self.backend) res = engine.get((1, 2, 3, 4)) engine.step() self.assertTrue(res.done()) self.assertRaises(nssct.engine.NoSuchObjectError, res.result)