Skip to content

Commit 193eb35

Browse files
committed
✅ Fix expected string when using orjson
Signed-off-by: ff137 <[email protected]>
1 parent aa026bc commit 193eb35

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/test_client.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@ def test_default_connect_command(self):
4141
try:
4242
import orjson
4343

44-
# If using orjson, expected string is without spaces
45-
expected = expected.replace(" ", "")
44+
# If using orjson, expected string is without spaces (except for first space after CONNECT)
45+
expected = expected.replace(" ", "").replace("CONNECT", "CONNECT ")
4646
except ImportError:
4747
pass
48-
4948
self.assertEqual(expected.encode(), got)
5049

5150
def test_default_connect_command_with_name(self):
@@ -61,8 +60,8 @@ def test_default_connect_command_with_name(self):
6160
try:
6261
import orjson
6362

64-
# If using orjson, expected string is without spaces
65-
expected = expected.replace(" ", "")
63+
# If using orjson, expected string is without spaces (except for first space after CONNECT)
64+
expected = expected.replace(" ", "").replace("CONNECT", "CONNECT ")
6665
except ImportError:
6766
pass
6867

0 commit comments

Comments
 (0)