Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{Misc.} Remove all occurrences of assertDictContainsSubset #29121

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def load_arguments(self, command):
}
for probe in some_expected_arguments:
existing = next(arg for arg in command_metadata.arguments if arg == probe)
self.assertDictContainsSubset(some_expected_arguments[existing].settings,
command_metadata.arguments[existing].options)
self.assertLessEqual(some_expected_arguments[existing].settings.items(),
command_metadata.arguments[existing].options.items())
self.assertEqual(command_metadata.arguments['vm_name'].options_list, ('--wonky-name', '-n'))

def test_register_command(self):
Expand Down Expand Up @@ -137,8 +137,8 @@ def load_arguments(self, command):

for probe in some_expected_arguments:
existing = next(arg for arg in command_metadata.arguments if arg == probe)
self.assertDictContainsSubset(some_expected_arguments[existing].settings,
command_metadata.arguments[existing].options)
self.assertLessEqual(some_expected_arguments[existing].settings.items(),
command_metadata.arguments[existing].options.items())
self.assertEqual(command_metadata.arguments['resource_group_name'].options_list,
['--resource-group-name'])

Expand Down Expand Up @@ -518,8 +518,8 @@ def load_arguments(self, command):

for probe in some_expected_arguments:
existing = next(arg for arg in command_metadata.arguments if arg == probe)
self.assertDictContainsSubset(some_expected_arguments[existing].settings,
command_metadata.arguments[existing].options)
self.assertLessEqual(some_expected_arguments[existing].settings.items(),
command_metadata.arguments[existing].options.items())

def test_command_build_argument_help_text(self):

Expand Down Expand Up @@ -562,8 +562,8 @@ def load_command_table(self, args):

for probe in some_expected_arguments:
existing = next(arg for arg in command_metadata.arguments if arg == probe)
self.assertDictContainsSubset(some_expected_arguments[existing].settings,
command_metadata.arguments[existing].options)
self.assertLessEqual(some_expected_arguments[existing].settings.items(),
command_metadata.arguments[existing].options.items())

def test_override_existing_option_string(self):
arg = CLIArgumentType(options_list=('--funky', '-f'))
Expand Down