@@ -235,7 +235,7 @@ def test_nonlinearizable_command_before_auth_with_account(
235235 )
236236
237237 run_command_mock .assert_called_once ()
238- assert run_command_mock .call_args [0 ][1 ] == expected_buffer
238+ assert expected_buffer in run_command_mock .call_args [0 ][1 ]
239239
240240 def test_nonlinearizable_command_before_auth_with_apikey (
241241 self , mocker : MockerFixture
@@ -255,4 +255,21 @@ def test_nonlinearizable_command_before_auth_with_apikey(
255255 expected_buffer = "SET CLIENT KEY NONLINEARIZABLE TO 1;AUTH APIKEY abc123;"
256256
257257 run_command_mock .assert_called_once ()
258- assert run_command_mock .call_args [0 ][1 ] == expected_buffer
258+ assert expected_buffer in run_command_mock .call_args [0 ][1 ]
259+
260+ def test_compression_enabled_by_default (self , mocker : MockerFixture ):
261+ driver = Driver ()
262+
263+ config = SQLiteCloudConfig ()
264+ config .account = SQLiteCloudAccount ()
265+ config .account .apikey = "abc123"
266+
267+ mocker .patch .object (driver , "_internal_connect" , return_value = None )
268+ run_command_mock = mocker .patch .object (driver , "_internal_run_command" )
269+
270+ driver .connect ("myhost" , 8860 , config )
271+
272+ expected_buffer = "SET CLIENT KEY COMPRESSION TO 1;"
273+
274+ run_command_mock .assert_called_once ()
275+ assert expected_buffer in run_command_mock .call_args [0 ][1 ]
0 commit comments