diff options
author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2021-05-15 23:28:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 23:28:57 +0300 |
commit | f7ed6c2320b8189dd38051b888fb968aac0898d7 (patch) | |
tree | cc848400523ea8312d4d14b592f02af2b632b69d /tests/test_60_sp.py | |
parent | 3bf6199fbde6c47eab79d88b4e3a21106f81c8d0 (diff) | |
parent | 2483c59b4e7915612ced70bcb01086428703e8ae (diff) | |
download | pysaml2-f7ed6c2320b8189dd38051b888fb968aac0898d7.tar.gz |
Merge pull request #797 from dirkmueller/master
Always use base64.encodebytes; base64.encodestring has been dropped
Diffstat (limited to 'tests/test_60_sp.py')
-rw-r--r-- | tests/test_60_sp.py | 5 |
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]}) |