''

def test_service_is_up(self):

    member = {'host': 'fake-host', 'topic': 'compute', 'forced_down': False}
    for retval in (True, False):
        driver = self.servicegroup_api._driver
        driver.is_up = mock.MagicMock(return_value=retval)
        result = self.servicegroup_api.service_is_up(member)
        self.assertIs(result, retval)
        driver.is_up.assert_called_with(member)
    member['forced_down'] = True
    driver = self.servicegroup_api._driver
    driver.is_up = mock.MagicMock()
    result = self.servicegroup_api.service_is_up(member)
    self.assertIs(result, False)
    driver.is_up.assert_not_called()
