summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2021-05-15 23:28:57 +0300
committerGitHub <noreply@github.com>2021-05-15 23:28:57 +0300
commitf7ed6c2320b8189dd38051b888fb968aac0898d7 (patch)
treecc848400523ea8312d4d14b592f02af2b632b69d
parent3bf6199fbde6c47eab79d88b4e3a21106f81c8d0 (diff)
parent2483c59b4e7915612ced70bcb01086428703e8ae (diff)
downloadpysaml2-f7ed6c2320b8189dd38051b888fb968aac0898d7.tar.gz
Merge pull request #797 from dirkmueller/master
Always use base64.encodebytes; base64.encodestring has been dropped
-rw-r--r--tests/test_60_sp.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_60_sp.py b/tests/test_60_sp.py
index 78e88400..b1eaa7c6 100644
--- a/tests/test_60_sp.py
+++ b/tests/test_60_sp.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import base64
+from base64 import encodebytes as b64encode
+
import pytest
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
from saml2.saml import NAMEID_FORMAT_TRANSIENT
@@ -73,7 +74,7 @@ class TestSP():
"urn:mace:example.com:saml:roland:sp", trans_name_policy,
"foba0001@example.com", authn=AUTHN)
- resp_str = base64.encodestring(resp_str.encode('utf-8'))
+ resp_str = b64encode(resp_str.encode('utf-8'))
self.sp.outstanding_queries = {"id1": "http://www.example.com/service"}
session_info = self.sp._eval_authn_response(
{}, {"SAMLResponse": [resp_str]})