Fixed several assertTrue() that were intended to be assertEqual(). (GH-8191)
Fixed also testing the "always" warning filter.
(cherry picked from commit b796e7dcdc24ff7ec53044af041254c83a8ace21)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index f377ebc..4f3c477 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -5843,7 +5843,7 @@
op=socket.ALG_OP_ENCRYPT, iv=iv)
enc = op.recv(msglen * multiplier)
self.assertEqual(len(enc), msglen * multiplier)
- self.assertTrue(enc[:msglen], ciphertext)
+ self.assertEqual(enc[:msglen], ciphertext)
op, _ = algo.accept()
with op: