This commit is contained in:
holger krekel
2024-07-30 12:19:23 +02:00
parent e3f0bb195d
commit 3ee0b7e288
4 changed files with 5 additions and 5 deletions

View File

@@ -12,11 +12,11 @@ def test_get_user_dict_not_set(testaddr, example_config, caplog):
user = example_config.get_user(testaddr)
assert not caplog.records
assert user.get_userdb_dict() == {}
assert len(caplog.records) == 1
assert len(caplog.records) == 0
user.set_password("")
assert user.get_userdb_dict() == {}
assert len(caplog.records) == 2
assert len(caplog.records) == 1
def test_get_user_dict(make_config, tmp_path):

View File

@@ -26,7 +26,6 @@ class User:
try:
pw = self.password_path.read_text()
except FileNotFoundError:
logging.error(f"password not set for: {self.addr}")
return {}
if not pw: