diff --git a/tests/unit/test_option_manager.py b/tests/unit/test_option_manager.py index 1ba5442..0086585 100644 --- a/tests/unit/test_option_manager.py +++ b/tests/unit/test_option_manager.py @@ -119,8 +119,7 @@ def test_parse_args_normalize_paths(optmanager): def test_format_plugin(): """Verify that format_plugin turns a tuple into a dictionary.""" - plugin = manager.OptionManager.format_plugin(('T101', 'Testing', '0.0.0')) - assert plugin['entry'] == 'T101' + plugin = manager.OptionManager.format_plugin(('Testing', '0.0.0')) assert plugin['name'] == 'Testing' assert plugin['version'] == '0.0.0' @@ -128,9 +127,9 @@ def test_format_plugin(): def test_generate_versions(optmanager): """Verify a comma-separated string is generated of registered plugins.""" optmanager.registered_plugins = [ - ('T100', 'Testing 100', '0.0.0'), - ('T101', 'Testing 101', '0.0.0'), - ('T300', 'Testing 300', '0.0.0'), + ('Testing 100', '0.0.0'), + ('Testing 101', '0.0.0'), + ('Testing 300', '0.0.0'), ] assert (optmanager.generate_versions() == 'Testing 100: 0.0.0, Testing 101: 0.0.0, Testing 300: 0.0.0') @@ -138,14 +137,13 @@ def test_generate_versions(optmanager): def test_generate_versions_with_format_string(optmanager): """Verify a comma-separated string is generated of registered plugins.""" - optmanager.registered_plugins = [ - ('T100', 'Testing', '0.0.0'), - ('T101', 'Testing', '0.0.0'), - ('T300', 'Testing', '0.0.0'), - ] + optmanager.registered_plugins.update([ + ('Testing', '0.0.0'), + ('Testing', '0.0.0'), + ('Testing', '0.0.0'), + ]) assert ( - optmanager.generate_versions('%(name)s(%(entry)s): %(version)s') == - 'Testing(T100): 0.0.0, Testing(T101): 0.0.0, Testing(T300): 0.0.0' + optmanager.generate_versions() == 'Testing: 0.0.0' ) @@ -155,9 +153,9 @@ def test_update_version_string(optmanager): assert optmanager.parser.version == TEST_VERSION optmanager.registered_plugins = [ - ('T100', 'Testing 100', '0.0.0'), - ('T101', 'Testing 101', '0.0.0'), - ('T300', 'Testing 300', '0.0.0'), + ('Testing 100', '0.0.0'), + ('Testing 101', '0.0.0'), + ('Testing 300', '0.0.0'), ] optmanager.update_version_string() @@ -172,14 +170,14 @@ def test_generate_epilog(optmanager): assert optmanager.parser.epilog is None optmanager.registered_plugins = [ - ('T100', 'Testing 100', '0.0.0'), - ('T101', 'Testing 101', '0.0.0'), - ('T300', 'Testing 300', '0.0.0'), + ('Testing 100', '0.0.0'), + ('Testing 101', '0.0.0'), + ('Testing 300', '0.0.0'), ] expected_value = ( - 'Installed plugins: Testing 100(T100): 0.0.0, Testing 101(T101): ' - '0.0.0, Testing 300(T300): 0.0.0' + 'Installed plugins: Testing 100: 0.0.0, Testing 101: 0.0.0, Testing' + ' 300: 0.0.0' ) optmanager.generate_epilog() diff --git a/tests/unit/test_plugin.py b/tests/unit/test_plugin.py index 0f6eec1..e995c7b 100644 --- a/tests/unit/test_plugin.py +++ b/tests/unit/test_plugin.py @@ -114,12 +114,6 @@ def test_register_options(): # Assert that we call add_options plugin_obj.add_options.assert_called_once_with(option_manager) - # Assert that we register the plugin - option_manager.register_plugin.assert_called_once_with( - entry_point_name='T000', - version=plugin_obj.version, - name=plugin_obj.name, - ) def test_register_options_checks_plugin_for_method():