Fix debug_main and minor cleanup

This commit is contained in:
Balakrishnan Balasubramanian 2024-04-01 17:45:37 -04:00
parent 829be8413b
commit f3e80c43ae
2 changed files with 8 additions and 8 deletions

View File

@ -386,13 +386,14 @@ def debug_main():
logging.basicConfig(level=logging.DEBUG)
import sys
from .pwhash import gen_pwhash
_, mails_path, port, password = sys.argv
_, mails_path, mbox = sys.argv
mails_path = Path(mails_path)
port = int(port)
users = [User(username="dummy", password_hash=gen_pwhash("dummy"), mbox=mbox)]
asyncio.run(a_main(mails_path, port, password_hash=password_hash))
asyncio.run(a_main("127.0.0.1", 1101, mails_path, users=users))
if __name__ == "__main__":

View File

@ -9,13 +9,11 @@ from mail4one.config import User
from pathlib import Path
TEST_HASH = "".join(
c
for c in """
"""
AFTY5EVN7AX47ZL7UMH3BETYWFBTAV3XHR73CEFAJBPN2NIHPWD
ZHV2UQSMSPHSQQ2A2BFQBNC77VL7F2UKATQNJZGYLCSU6C43UQD
AQXWXSWNGAEPGIMG2F3QDKBXL3MRHY6K2BPID64ZR6LABLPVSF
"""
if not c.isspace()
""".split()
)
TEST_USER = "foobar"
@ -42,7 +40,8 @@ Hello bro\r
IlzVOJqu9Zp7twFAtzcV\r
yQVk36B0mGU2gtWxXLr\r
PeF0RtbI0mAuVPLQDHCi\r
\r\n"""
\r
"""
def setUpModule() -> None: