-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0c332a
commit fb183bc
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
# | ||
# This file is part of Invenio. | ||
# Copyright (C) 2015-2023 CERN. | ||
# Copyright (C) 2024 Graz University of Technology. | ||
# | ||
# Invenio is free software; you can redistribute it and/or modify it | ||
# under the terms of the MIT License; see LICENSE file for more details. | ||
|
@@ -10,7 +11,7 @@ | |
|
||
import time | ||
|
||
from cachelib import RedisCache, SimpleCache | ||
from cachelib import SimpleCache | ||
from flask_principal import ActionNeed, Need, RoleNeed, UserNeed | ||
from invenio_accounts.models import Role, User | ||
from invenio_db import db | ||
|
@@ -86,10 +87,9 @@ def test_invenio_access_permission_cache(app, dynamic_permission): | |
) | ||
|
||
|
||
def test_invenio_access_permission_cache_redis(app, dynamic_permission): | ||
def test_invenio_access_permission_cache_redis(app, redis_cache, dynamic_permission): | ||
"""Caching the user using redis.""" | ||
cache = RedisCache() | ||
InvenioAccess(app, cache=cache) | ||
InvenioAccess(app, cache=redis_cache) | ||
user_can_all = User(email="[email protected]") | ||
user_can_open = User(email="[email protected]") | ||
user_can_open_1 = User(email="[email protected]") | ||
|