Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.

Commit 2913213

Browse files
authored
Merge pull request #18 from peppelinux/master
Tox travis configured
2 parents 0e25a24 + a8dee21 commit 2913213

5 files changed

Lines changed: 40 additions & 8 deletions

File tree

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ addons:
1313
-
1414

1515
install:
16-
- pip install pytest
1716
- pip install codecov
18-
17+
- pip install tox
18+
- pip install tox-travis
1919
script:
2020
- codecov --version
21+
- tox
2122

2223
after_success:
2324
- codecov

requirements.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pyyaml
2+
jinja2
3+
cryptography
4+
requests
5+
pycryptodomex
6+
git+https://github.com/openid/JWTConnect-Python-CryptoJWT.git
7+
git+https://github.com/openid/JWTConnect-Python-OidcMsg.git
8+
git+https://github.com/openid/JWTConnect-Python-OidcService.git
9+
10+

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ def run_tests(self):
6868
"oidcmsg>=0.6.3",
6969
"oidcservice>=0.6.3",
7070
"cryptojwt>=0.7.0",
71-
"jinja2"
71+
"jinja2",
72+
"pyyaml",
73+
"pycryptodomex"
7274
],
7375
tests_require=[
7476
"pytest", "requests_mock", 'pytest-localserver'

src/oidcendpoint/endpoint_context.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,9 @@ def __init__(
216216
# client registration access tokens
217217
self.registration_access_token = {}
218218

219-
def set_session_db(self, conf, sso_db=None):
220-
sso_db = sso_db if sso_db else SSODb()
221-
self.do_session_db(conf, sso_db)
219+
def set_session_db(self, conf, sso_db=None, db=None):
220+
sso_db = sso_db or SSODb()
221+
self.do_session_db(conf, sso_db, db)
222222
# append useinfo db to the session db
223223
self.do_userinfo()
224224
logger.debug('Session DB: {}'.format(self.sdb.__dict__))
@@ -288,10 +288,10 @@ def do_sub_func(self):
288288
else:
289289
self._sub_func[key] = args["function"]
290290

291-
def do_session_db(self, conf, sso_db):
291+
def do_session_db(self, conf, sso_db, db=None):
292292
th_args = get_token_handlers(conf)
293293
self.sdb = create_session_db(
294-
self, th_args, db=None,
294+
self, th_args, db=db,
295295
sso_db=sso_db,
296296
sub_func=self._sub_func
297297
)

tox.ini

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[tox]
2+
envlist =
3+
py36
4+
py37
5+
pypy3
6+
7+
[testenv]
8+
deps =
9+
-r requirements.txt
10+
-r requirements-dev.txt
11+
whitelist_externals =
12+
tox
13+
commands =
14+
python --version
15+
pytest --version
16+
tox --version
17+
pip --version
18+
pip freeze
19+
pytest -vvv -rs {posargs:tests/}

0 commit comments

Comments
 (0)