def testing_resolver(lock, thing, name): if name == 'lock': lock.acquire() return True return engine.resolve_item(thing, name)
def test_engine_resolve_item(self): thing = {'name': 'Alice'} self.assertEqual(engine.resolve_item(thing, 'name'), thing['name']) with self.assertRaises(errors.SymbolResolutionError): engine.resolve_item(thing, 'email')