def test_threshold_from_config(self): actor = zone.ZoneActor( self.executor, self.context, self.pool, mock.Mock(action='CREATE') ) self.assertEqual( cfg.CONF['service:worker'].threshold_percentage, actor.threshold )
def setUp(self): self.context = mock.Mock() self.pool = mock.Mock() self.executor = mock.Mock() self.actor = zone.ZoneActor( self.executor, self.context, self.pool, mock.Mock(action='CREATE'), )