'Test that the SAML private key can be stored in Django settings and not the DB'

def test_secure_key_configuration(self):

    self.enable_saml(public_key='', private_key='', other_config_str='{"SECURITY_CONFIG":    {"signMetadata":    true}    }')
    with self.assertRaises(OneLogin_Saml2_Error):
        self._fetch_metadata()
    with self.settings(SOCIAL_AUTH_SAML_SP_PRIVATE_KEY=self._get_private_key('saml_key'), SOCIAL_AUTH_SAML_SP_PUBLIC_CERT=self._get_public_key('saml_key')):
        self._validate_signed_metadata()
