chore: prepare release v0.4.0
This commit is contained in:
+5
-5
@@ -11,7 +11,7 @@ class TestBootstrap:
|
||||
def test_bootstrap_user_from_hash(self, users_path: str, bootstrap_hash: str) -> None:
|
||||
users = Users(path=users_path, bootstrap_hash=bootstrap_hash)
|
||||
assert len(users.all) == 1
|
||||
assert users.authenticate("admin", "secret") is not None
|
||||
assert users.authenticate("admin", "volumen-test-password") is not None
|
||||
|
||||
def test_bootstrap_user_is_admin(self, users_path: str, bootstrap_hash: str) -> None:
|
||||
users = Users(path=users_path, bootstrap_hash=bootstrap_hash)
|
||||
@@ -34,13 +34,13 @@ class TestFind:
|
||||
|
||||
class TestAuthenticate:
|
||||
def test_authenticate_correct_password(self, users: Users) -> None:
|
||||
assert users.authenticate("admin", "secret") is not None
|
||||
assert users.authenticate("admin", "volumen-test-password") is not None
|
||||
|
||||
def test_authenticate_wrong_password(self, users: Users) -> None:
|
||||
assert users.authenticate("admin", "nope") is None
|
||||
|
||||
def test_authenticate_nonexistent_user(self, users: Users) -> None:
|
||||
assert users.authenticate("nobody", "secret") is None
|
||||
assert users.authenticate("nobody", "volumen-test-password") is None
|
||||
|
||||
|
||||
class TestAdd:
|
||||
@@ -209,9 +209,9 @@ class TestPersistence:
|
||||
|
||||
def test_password_survives_persistence(self, users_path: str) -> None:
|
||||
users = Users(path=users_path)
|
||||
users.add("alice", "secret123")
|
||||
users.add("alice", "alice-test-password")
|
||||
fresh = Users(path=users_path)
|
||||
assert fresh.authenticate("alice", "secret123") is not None
|
||||
assert fresh.authenticate("alice", "alice-test-password") is not None
|
||||
assert fresh.authenticate("alice", "wrong") is None
|
||||
|
||||
def test_mtime_cache_invalidation(self, users_path: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user