Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
utku-ozturk committed Nov 4, 2023
1 parent 564b1fc commit 8fec7a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dcicutils"
version = "8.2.0"
version = "8.3.0.0a1"
description = "Utility package for interacting with the 4DN Data Portal and other 4DN resources"
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
8 changes: 6 additions & 2 deletions test/test_redis_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_redis_session_basic(self, redisdb):
rd = RedisBase(redisdb)
session_token = RedisSessionToken(
namespace=self.NAMESPACE,
email=self.DUMMY_EMAIL,
jwt=self.DUMMY_JWT
)
session_token.store_session_token(redis_handler=rd)
Expand All @@ -34,7 +35,7 @@ def test_redis_session_basic(self, redisdb):
assert not session_token.validate_session_token(redis_handler=rd)
# update with a new token and expiration
session_token.redis_key = working_token
session_token.update_session_token(redis_handler=rd, jwt=self.DUMMY_JWT)
session_token.update_session_token(redis_handler=rd, email=self.DUMMY_EMAIL, jwt=self.DUMMY_JWT)
assert session_token.validate_session_token(redis_handler=rd)
session_token.redis_key = working_token
assert not session_token.validate_session_token(redis_handler=rd)
Expand All @@ -47,13 +48,14 @@ def test_redis_session_expired_token(self, redisdb):
with mock.patch.object(RedisSessionToken, '_build_session_expiration', self.mock_build_session_expiration):
session_token = RedisSessionToken(
namespace=self.NAMESPACE,
email=self.DUMMY_EMAIL,
jwt=self.DUMMY_JWT
)
session_token.store_session_token(redis_handler=rd)
time.sleep(2)
assert not session_token.validate_session_token(redis_handler=rd)
# update then should validate
session_token.update_session_token(redis_handler=rd, jwt=self.DUMMY_JWT)
session_token.update_session_token(redis_handler=rd, email=self.DUMMY_EMAIL, jwt=self.DUMMY_JWT)
assert session_token.validate_session_token(redis_handler=rd)

def test_redis_session_many_sessions(self, redisdb):
Expand All @@ -65,6 +67,7 @@ def test_redis_session_many_sessions(self, redisdb):
for _ in range(5):
session_token = RedisSessionToken(
namespace=self.NAMESPACE,
email=self.DUMMY_EMAIL,
jwt=self.DUMMY_JWT
)
session_token.store_session_token(redis_handler=rd)
Expand Down Expand Up @@ -92,6 +95,7 @@ def test_redis_session_from_redis_equality(self, redisdb):
rd = RedisBase(redisdb)
session_token_local = RedisSessionToken(
namespace=self.NAMESPACE,
email=self.DUMMY_EMAIL,
jwt=self.DUMMY_JWT
)
session_token_local.store_session_token(redis_handler=rd)
Expand Down

0 comments on commit 8fec7a9

Please sign in to comment.