Exemplo n.º 1
0
def testing_resolver(lock, thing, name):
    if name == 'lock':
        lock.acquire()
        return True
    return engine.resolve_item(thing, name)
Exemplo n.º 2
0
 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')