Пример #1
0
 def test_plugins_setting_few_default_enabled(self):
     plugin1 = PluginStub('plugin1', True)
     plugin2 = PluginStub('plugin2', False)
     plugin3 = PluginStub('plugin3', True)
     setting = PluginsSetting('name', choices=[plugin1, plugin2, plugin3])
     self.assertEquals(setting.get_enabled(), set(['plugin1', 'plugin3']))
Пример #2
0
 def test_plugins_setting_all_default_enabled(self):
     plugin1 = PluginStub("plugin1", True)
     plugin2 = PluginStub("plugin2", True)
     setting = PluginsSetting(["3"], choices=[plugin1, plugin2])
     self.assertEquals(setting.get_enabled(), set(["plugin1", "plugin2"]))
Пример #3
0
 def test_plugins_setting_all_default_enabled(self):
     plugin1 = PluginStub('plugin1', True)
     plugin2 = PluginStub('plugin2', True)
     setting = PluginsSetting(['3'], choices=[plugin1, plugin2])
     self.assertEquals(setting.get_enabled(), set(['plugin1', 'plugin2']))
Пример #4
0
 def test_plugins_setting_few_default_enabled(self):
     plugin1 = PluginStub("plugin1", True)
     plugin2 = PluginStub("plugin2", False)
     plugin3 = PluginStub("plugin3", True)
     setting = PluginsSetting("name", choices=[plugin1, plugin2, plugin3])
     self.assertEquals(setting.get_enabled(), set(["plugin1", "plugin3"]))