def _is_allocated(self, agent, name, value):
     _, allocated = agent.list_resource()
     return value == allocated.get(name)
 def _assert_allocated(self, agent, name, value):
     _, allocated = agent.list_resource()
     self.assertEqual(value, allocated.get(name))