mirror of
https://github.com/chatmail/relay.git
synced 2026-05-16 11:58:57 +00:00
fix #385
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user