(self)
| 232 | |
| 233 | |
| 234 | def test_plugin_functions(self): |
| 235 | # Check db/fs syncing |
| 236 | if os.path.exists('coreplugins/test_copy'): |
| 237 | print("Removing plugins/test_copy") |
| 238 | shutil.rmtree('coreplugins/test_copy') |
| 239 | |
| 240 | sync_plugin_db() |
| 241 | self.assertTrue(Plugin.objects.filter(pk='test_copy').count() == 0) |
| 242 | |
| 243 | shutil.copytree('coreplugins/test', 'coreplugins/test_copy') |
| 244 | |
| 245 | sync_plugin_db() |
| 246 | self.assertTrue(Plugin.objects.filter(pk='test_copy').count() == 1) |
| 247 | |
| 248 | shutil.rmtree('coreplugins/test_copy') |
| 249 | sync_plugin_db() |
| 250 | self.assertTrue(Plugin.objects.filter(pk='test_copy').count() == 0) |
| 251 | |
| 252 | # Get manifest works and parses JSON |
| 253 | p = get_plugin_by_name("test", only_active=False) |
| 254 | self.assertEqual(p.get_manifest()['author'], "Piero Toffanin") |
| 255 | |
| 256 | |
| 257 | def test_plugin_loading(self): |
nothing calls this directly
no test coverage detected