Skip to content

Commit f7ed6c2

Browse files
Merge pull request #797 from dirkmueller/master
Always use base64.encodebytes; base64.encodestring has been dropped
2 parents 3bf6199 + 2483c59 commit f7ed6c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_60_sp.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
import base64
4+
from base64 import encodebytes as b64encode
5+
56
import pytest
67
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
78
from saml2.saml import NAMEID_FORMAT_TRANSIENT
@@ -73,7 +74,7 @@ def test_identify(self):
7374
"urn:mace:example.com:saml:roland:sp", trans_name_policy,
7475
"[email protected]", authn=AUTHN)
7576

76-
resp_str = base64.encodestring(resp_str.encode('utf-8'))
77+
resp_str = b64encode(resp_str.encode('utf-8'))
7778
self.sp.outstanding_queries = {"id1": "http://www.example.com/service"}
7879
session_info = self.sp._eval_authn_response(
7980
{}, {"SAMLResponse": [resp_str]})

0 commit comments

Comments
 (0)