def test_disabled(self):
        ret = {'changes': 'saltstack', 'comment': '', 'name': 'salt',
               'result': True}
        mock = MagicMock(return_value={'changes': 'saltstack'})
        with patch.object(service, '_disable', mock):
            self.assertDictEqual(service.disabled("salt"), ret)
Test to verify that the service is disabled
dataset/ETHPy150Open saltstack/salt/tests/unit/states/service_test.py/ServiceTestCase.test_disabled