'Test switch_in_compliance fail.'

def test_switch_in_compliance_fail(self):

    module = Mock()
    module.client.api.check_compliance.return_value = dict(complianceCode='0001')
    sw_info = dict(key='key', type='type', fqdn='eos')
    cv_server_provision.switch_in_compliance(module, sw_info)
    self.assertEqual(module.client.api.check_compliance.call_count, 1)
    module.fail_json.assert_called_with(msg='Switch    eos    is    not    in    compliance.    Returned    compliance    code    0001.')
