From 1efde7659c240ce17858d355bf83a1f1807a0f4b Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Fri, 3 May 2024 09:32:03 -0500 Subject: [PATCH] PYTHON-1384 Remove usages of unittest.assertDictContainsSubset (#1206) --- tests/integration/cqlengine/management/test_management.py | 2 +- tests/integration/standard/test_metadata.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/cqlengine/management/test_management.py b/tests/integration/cqlengine/management/test_management.py index e4febcc14b..6655a78fc4 100644 --- a/tests/integration/cqlengine/management/test_management.py +++ b/tests/integration/cqlengine/management/test_management.py @@ -254,7 +254,7 @@ def test_table_property_update(self): table_options = management._get_table_metadata(ModelWithTableProperties).options - self.assertDictContainsSubset(ModelWithTableProperties.__options__, table_options) + self.assertLessEqual(ModelWithTableProperties.__options__.items(), table_options.items()) def test_bogus_option_update(self): sync_table(ModelWithTableProperties) diff --git a/tests/integration/standard/test_metadata.py b/tests/integration/standard/test_metadata.py index 3534f29f9f..c8930a56fc 100644 --- a/tests/integration/standard/test_metadata.py +++ b/tests/integration/standard/test_metadata.py @@ -1751,9 +1751,9 @@ def test_init_cond(self): cql_init = encoder.cql_encode_all_types(init_cond) with self.VerifiedAggregate(self, **self.make_aggregate_kwargs('update_map', 'map', init_cond=cql_init)) as va: map_res = s.execute("SELECT %s(v) AS map_res FROM t" % va.function_kwargs['name'])[0].map_res - self.assertDictContainsSubset(expected_map_values, map_res) + self.assertLessEqual(expected_map_values.items(), map_res.items()) init_not_updated = dict((k, init_cond[k]) for k in set(init_cond) - expected_key_set) - self.assertDictContainsSubset(init_not_updated, map_res) + self.assertLessEqual(init_not_updated.items(), map_res.items()) c.shutdown() def test_aggregates_after_functions(self):