From b04d08e383e6429ae0e195e85bd089aa8bc74d2b Mon Sep 17 00:00:00 2001 From: Mikhail Denisenko Date: Sat, 27 Jan 2024 14:23:41 -0500 Subject: [PATCH] Fixed unit-tests --- src/pytds/tds_session.py | 2 +- tests/simple_server.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pytds/tds_session.py b/src/pytds/tds_session.py index 944369b..6d0342d 100644 --- a/src/pytds/tds_session.py +++ b/src/pytds/tds_session.py @@ -1270,7 +1270,7 @@ def process_prelogin(self, login: _TdsLogin) -> None: size = len(p) if size <= 0 or resp_header.type != tds_base.PacketType.REPLY: self.bad_stream( - "Invalid packet type: {0}, expected PRELOGIN(4)".format( + "Invalid packet type: {0}, expected REPLY(4)".format( self._reader.packet_type ) ) diff --git a/tests/simple_server.py b/tests/simple_server.py index b8dd85f..3899a64 100644 --- a/tests/simple_server.py +++ b/tests/simple_server.py @@ -181,7 +181,7 @@ def handle(self): except OpenSSL.SSL.WantReadError: pass else: - w.begin_packet(pytds.tds_base.PacketType.REPLY) + w.begin_packet(pytds.tds_base.PacketType.PRELOGIN) w.write(buf) w.flush() @@ -195,7 +195,7 @@ def handle(self): except OpenSSL.SSL.WantReadError: pass else: - w.begin_packet(pytds.tds_base.PacketType.REPLY) + w.begin_packet(pytds.tds_base.PacketType.PRELOGIN) w.write(buf) w.flush()