def test_available(self): """ Test for Returns ``True`` if the specified service is available, otherwise returns``False``. """ mock = MagicMock(return_value=[]) with patch.object(daemontools, "get_all", mock): self.assertFalse(daemontools.available("name"))
def test_available(self): ''' Test for Returns ``True`` if the specified service is available, otherwise returns``False``. ''' mock = MagicMock(return_value=[]) with patch.object(daemontools, 'get_all', mock): self.assertFalse(daemontools.available('name'))