Skip to content

Commit

Permalink
[ 118] Replace assertEquals with assertEqual in tests
Browse files Browse the repository at this point in the history
unittest.assertEquals was deprecated as an alias of unittest.assertEqual
in python 3.2. The alias was removed in python 3.12. This commit replaces
the use of the deprecated / removed alias with the proper method name.
  • Loading branch information
alanking committed Aug 6, 2024
1 parent 855f9ba commit 6433410
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packaging/test_rule_engine_plugin_logical_quotas.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,10 @@ def test_adding_duplicate_attribute_names_with_different_values_or_units_is_not_

# Assert that the quota values are what we expect them to be.
values = self.get_logical_quotas_attribute_values(col, include_max_values=True)
self.assertEquals(values[self.maximum_number_of_data_objects_attribute()], 10)
self.assertEquals(values[self.maximum_size_in_bytes_attribute()], 1000)
self.assertEquals(values[self.total_number_of_data_objects_attribute()], 0)
self.assertEquals(values[self.total_size_in_bytes_attribute()], 0)
self.assertEqual(values[self.maximum_number_of_data_objects_attribute()], 10)
self.assertEqual(values[self.maximum_size_in_bytes_attribute()], 1000)
self.assertEqual(values[self.total_number_of_data_objects_attribute()], 0)
self.assertEqual(values[self.total_size_in_bytes_attribute()], 0)

expected_output = ['-169000 SYS_NOT_ALLOWED']

Expand All @@ -584,10 +584,10 @@ def test_adding_duplicate_attribute_names_with_different_values_or_units_is_not_

# Show that the quota values have not changed.
values = self.get_logical_quotas_attribute_values(col, include_max_values=True)
self.assertEquals(values[self.maximum_number_of_data_objects_attribute()], 10)
self.assertEquals(values[self.maximum_size_in_bytes_attribute()], 1000)
self.assertEquals(values[self.total_number_of_data_objects_attribute()], 0)
self.assertEquals(values[self.total_size_in_bytes_attribute()], 0)
self.assertEqual(values[self.maximum_number_of_data_objects_attribute()], 10)
self.assertEqual(values[self.maximum_size_in_bytes_attribute()], 1000)
self.assertEqual(values[self.total_number_of_data_objects_attribute()], 0)
self.assertEqual(values[self.total_size_in_bytes_attribute()], 0)

@unittest.skipIf(test.settings.RUN_IN_TOPOLOGY, "Skip for Topology Testing")
def test_executing_logical_quotas_rules_do_not_fail_when_group_permissions_are_present__issue_46(self):
Expand Down Expand Up @@ -940,8 +940,8 @@ def make_directory(self, dir_name, files, file_size):

def assert_quotas(self, coll, expected_number_of_objects, expected_size_in_bytes):
values = self.get_logical_quotas_attribute_values(coll)
self.assertEquals(values[self.total_number_of_data_objects_attribute()], expected_number_of_objects)
self.assertEquals(values[self.total_size_in_bytes_attribute()], expected_size_in_bytes)
self.assertEqual(values[self.total_number_of_data_objects_attribute()], expected_number_of_objects)
self.assertEqual(values[self.total_size_in_bytes_attribute()], expected_size_in_bytes)

def enable_rule_engine_plugin(self, config, namespace=None):
config.server_config['log_level']['rule_engine'] = 'trace'
Expand Down

0 comments on commit 6433410

Please sign in to comment.