summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml3
-rw-r--r--src/saml2/client_base.py13
-rw-r--r--tox.ini5
3 files changed, 12 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index f10268fc..87c541bc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,10 +1,13 @@
+dist: xenial
sudo: false
+
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
+ - 3.7
- pypy
- pypy3
diff --git a/src/saml2/client_base.py b/src/saml2/client_base.py
index f90c4378..c7a85ecb 100644
--- a/src/saml2/client_base.py
+++ b/src/saml2/client_base.py
@@ -371,13 +371,12 @@ class Base(Entity):
except KeyError:
nsprefix = None
- try:
- force_authn = kwargs['force_authn']
- except KeyError:
- force_authn = self.config.getattr('force_authn', 'sp')
- finally:
- if force_authn:
- args['force_authn'] = 'true'
+ force_authn = (
+ kwargs.get("force_authn")
+ or self.config.getattr('force_authn', 'sp')
+ )
+ if str(force_authn).lower() == 'true':
+ args['force_authn'] = 'true'
conf_sp_type = self.config.getattr('sp_type', 'sp')
conf_sp_type_in_md = self.config.getattr('sp_type_in_metadata', 'sp')
diff --git a/tox.ini b/tox.ini
index d9dc9fe5..47d04407 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,6 +4,7 @@ envlist =
py34
py35
py36
+ py37
pypy
pypy3
@@ -15,8 +16,8 @@ whitelist_externals =
commands =
xmlsec1 --version
python --version
- py.test --version
+ pytest --version
tox --version
pip --version
pip freeze
- py.test --cov={envsitepackagesdir}/saml2 -v -rs {posargs:tests/}
+ pytest --cov={envsitepackagesdir}/saml2 -vvv -rs {posargs:tests/}