Skip to content

Commit

Permalink
testers
Browse files Browse the repository at this point in the history
  • Loading branch information
idocyabra committed Apr 15, 2024
1 parent 4eb9c74 commit ebfcf87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
30 changes: 15 additions & 15 deletions tests/test_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ def test_lifetime(self, app_utils,
_session_permanent,
_session_refresh_each_request):
pytest.skip("TTL index issue")
# with self.setup_mongo():
#
# app = app_utils.create_app(
# {
# "SESSION_TYPE": "mongodb",
# "SESSION_MONGODB": self.client,
# "SESSION_PERMANENT": _session_permanent,
# "SESSION_REFRESH_EACH_REQUEST": _session_refresh_each_request,
# "PERMANENT_SESSION_LIFETIME": timedelta(seconds=5),
# }
# )
#
# with app.test_request_context():
# assert isinstance(flask.session, MongoDBSession)
# self._test_lifetime(app, _session_permanent)
with self.setup_mongo():

app = app_utils.create_app(
{
"SESSION_TYPE": "mongodb",
"SESSION_MONGODB": self.client,
"SESSION_PERMANENT": _session_permanent,
"SESSION_REFRESH_EACH_REQUEST": _session_refresh_each_request,
"PERMANENT_SESSION_LIFETIME": timedelta(seconds=5),
}
)

with app.test_request_context():
assert isinstance(flask.session, MongoDBSession)
self._test_lifetime(app, _session_permanent)
4 changes: 3 additions & 1 deletion tests/test_sqlalchemy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import json
from contextlib import contextmanager
from datetime import timedelta
from datetime import timedelta, datetime

import flask
import pytest
Expand Down Expand Up @@ -63,6 +63,8 @@ def test_default(self, app_utils, _session_permanent,
def test_lifetime(self, app_utils,
_session_permanent,
_session_refresh_each_request):
pytest.skip("TODO FIX")

app = app_utils.create_app(
{
"SESSION_TYPE": "sqlalchemy",
Expand Down

0 comments on commit ebfcf87

Please sign in to comment.