def test_detached_with_failure(self):
        self.conn.list_principal_policies.return_value = {'policies': [policy_ret]}
        self.conn.detach_principal_policy.side_effect = ClientError(error_content, 'detach_principal_policy')
        result = salt_states['boto_iot.policy_detached']('test', policy_ret['policyName'], principal)
        self.assertFalse(result['result'])
        self.assertEqual(result['changes'], {})
Tests detached on a policy that is detached.
dataset/ETHPy150Open saltstack/salt/tests/unit/states/boto_iot_test.py/BotoIoTPolicyTestCase.test_detached_with_failure