From 82e6bedacf4555066ce91cef07f6e5a274620ad0 Mon Sep 17 00:00:00 2001 From: davidlm Date: Tue, 25 Jul 2023 16:47:09 -0400 Subject: [PATCH] add test case for coercible boolean and small fix to no compression test --- tests/unit/test_args.py | 6 ++++++ tests/unit/test_compress.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_args.py b/tests/unit/test_args.py index dfdcd9d514..8f1c992422 100644 --- a/tests/unit/test_args.py +++ b/tests/unit/test_args.py @@ -572,6 +572,12 @@ def test_coercible_value_request_min_compression_size_bytes(self): config = client_args['client_config'] self.assertEqual(config.request_min_compression_size_bytes, 100) + def test_coercible_value_disable_request_compression(self): + config = Config(disable_request_compression='true') + client_args = self.call_get_client_args(client_config=config) + config = client_args['client_config'] + self.assertTrue(config.disable_request_compression) + def test_bad_type_request_min_compression_size_bytes(self): with self.assertRaises(exceptions.InvalidConfigError): config = Config(request_min_compression_size_bytes='foo') diff --git a/tests/unit/test_compress.py b/tests/unit/test_compress.py index 073a0eecc2..d9389de3d0 100644 --- a/tests/unit/test_compress.py +++ b/tests/unit/test_compress.py @@ -274,7 +274,7 @@ def test_no_compression(config, request_dict, operation_model): original_body = request_dict['body'] maybe_compress_request(config, request_dict, operation_model) assert request_dict['body'] is original_body - assert ce_header == request_dict['headers'].get('Content-Encoding') + assert ce_header is request_dict['headers'].get('Content-Encoding') def test_dict_no_compression():