diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 14:52:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 14:52:21 +0000 |
commit | d1772d410235592b482e3b08b1863f6624d9fe6b (patch) | |
tree | accfb4b99c32e5e435089f8023d62e67a6951603 /deluge/tests/test_plugin_metadata.py | |
parent | Initial commit. (diff) | |
download | deluge-d1772d410235592b482e3b08b1863f6624d9fe6b.tar.xz deluge-d1772d410235592b482e3b08b1863f6624d9fe6b.zip |
Adding upstream version 2.0.3.upstream/2.0.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/tests/test_plugin_metadata.py')
-rw-r--r-- | deluge/tests/test_plugin_metadata.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/deluge/tests/test_plugin_metadata.py b/deluge/tests/test_plugin_metadata.py new file mode 100644 index 0000000..436fc2c --- /dev/null +++ b/deluge/tests/test_plugin_metadata.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# +# Copyright (C) 2015 Calum Lind <calumlind@gmail.com> +# +# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with +# the additional special exception to link portions of this program with the OpenSSL library. +# See LICENSE for more details. +# + +from __future__ import unicode_literals + +from deluge.pluginmanagerbase import PluginManagerBase + +from . import common +from .basetest import BaseTestCase + + +class PluginManagerBaseTestCase(BaseTestCase): + def set_up(self): + common.set_tmp_config_dir() + + def test_get_plugin_info(self): + pm = PluginManagerBase('core.conf', 'deluge.plugin.core') + for p in pm.get_available_plugins(): + for key, value in pm.get_plugin_info(p).items(): + self.assertTrue(isinstance('%s: %s' % (key, value), ''.__class__)) + + def test_get_plugin_info_invalid_name(self): + pm = PluginManagerBase('core.conf', 'deluge.plugin.core') + for key, value in pm.get_plugin_info('random').items(): + self.assertEqual(value, 'not available') |