diff --git a/chatmaild/src/chatmaild/dictproxy.py b/chatmaild/src/chatmaild/dictproxy.py index 522a8cf1..f1299eb9 100644 --- a/chatmaild/src/chatmaild/dictproxy.py +++ b/chatmaild/src/chatmaild/dictproxy.py @@ -1,10 +1,6 @@ import logging import os -from socketserver import ( - StreamRequestHandler, - ThreadingMixIn, - UnixStreamServer, -) +from socketserver import StreamRequestHandler, ThreadingUnixStreamServer class DictProxy: @@ -86,12 +82,8 @@ class DictProxy: except FileNotFoundError: pass - with ThreadedUnixStreamServer(socket, Handler) as server: + with ThreadingUnixStreamServer(socket, Handler) as server: try: server.serve_forever() except KeyboardInterrupt: pass - - -class ThreadedUnixStreamServer(ThreadingMixIn, UnixStreamServer): - request_queue_size = 100 diff --git a/chatmaild/src/chatmaild/tests/test_doveauth.py b/chatmaild/src/chatmaild/tests/test_doveauth.py index 9b12d1d5..702b2133 100644 --- a/chatmaild/src/chatmaild/tests/test_doveauth.py +++ b/chatmaild/src/chatmaild/tests/test_doveauth.py @@ -129,7 +129,7 @@ def test_handle_dovecot_protocol_hello_is_skipped(db, example_config, caplog): assert not caplog.messages -def test_handle_dovecot_protocol(db, example_config): +def test_handle_dovecot_protocol_user_not_exists(db, example_config): dictproxy = AuthDictProxy(db=db, config=example_config) rfile = io.BytesIO( b"H3\t2\t0\t\tauth\nLshared/userdb/foobar@chat.example.org\tfoobar@chat.example.org\n"