Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
language: python
env:
- TOXENV=py27
- TOXENV=py33
matrix:
include:
- python: 3.8
env: TOXENV=py38
- python: 3.7
env: TOXENV=py37
- python: 3.6
env: TOXENV=py36
- python: 3.5
env: TOXENV=py35
- python: 2.7
env: TOXENV=py27
install: pip install tox
script: tox
services:
Expand Down
16 changes: 12 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ def store(request):
if request.param == 'dict':
return DictStore()
elif request.param == 'redis':
return request.getfuncargvalue('redis_store')
return request.getfixturevalue('redis_store')

assert False


@pytest.fixture
def client(app):
def _client(app):
client = app.test_client()

def get_session_cookie(self, path='/'):
Expand All @@ -56,7 +55,11 @@ def get_session_cookie(self, path='/'):


@pytest.fixture
def app(store):
def client(app):
return _client(app)


def _app(store):
app = Flask(__name__)

app.kvsession = KVSessionExtension(store, app)
Expand Down Expand Up @@ -133,3 +136,8 @@ def destroy_immediately():
return 'PROFIT'

return app


@pytest.fixture
def app(store):
return _app(store)
6 changes: 3 additions & 3 deletions tests/test_expiration.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import timedelta

from conftest import app as app_, client as client_
from conftest import _app, _client
import pytest


Expand All @@ -9,12 +9,12 @@

@pytest.fixture
def redis_app(redis_store):
return app_(redis_store)
return _app(redis_store)


@pytest.fixture
def redis_client(redis_app):
return client_(redis_app)
return _client(redis_app)


def test_redis_expiration_permanent_session(
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27,py33
envlist = py27,py35,py36,py37,py38

[testenv]
deps=
Expand Down