Skip to content
Snippets Groups Projects
Commit 60ca64bd authored by Stefano Borini's avatar Stefano Borini
Browse files

Added tests for the plugin_id

parent 8c3681f3
No related branches found
No related tags found
1 merge request!53Silenced warnings for IDs not specified by specifying them
import unittest
from force_bdss.ids import bundle_id
from force_bdss.ids import bundle_id, plugin_id
class TestIdGenerators(unittest.TestCase):
......@@ -13,3 +13,12 @@ class TestIdGenerators(unittest.TestCase):
bundle_id(bad_entry, "bar")
with self.assertRaises(ValueError):
bundle_id("foo", bad_entry)
def test_plugin_id(self):
self.assertEqual(plugin_id("foo", "bar"), "force.bdss.plugin.foo.bar")
for bad_entry in ["", None, " ", "foo bar"]:
with self.assertRaises(ValueError):
plugin_id(bad_entry, "bar")
with self.assertRaises(ValueError):
plugin_id("foo", bad_entry)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment