diff options
author | mike <michael.jmontcalm@gmail.com> | 2009-11-24 03:12:49 (GMT) |
---|---|---|
committer | mike <michael.jmontcalm@gmail.com> | 2009-11-24 03:12:49 (GMT) |
commit | d029d1b6bb4d6c269db3d8a7825be239b82807fa (patch) | |
tree | 4d1e52897fae86b2c396c539e3088be308eb9933 | |
parent | b1ff3d93cd809ce434f911ad004746d8c5998df5 (diff) |
Boy scout : Fixing addon tests!
-rw-r--r-- | tests/addontests.py | 7 | ||||
-rw-r--r-- | tutorius/addon.py | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/addontests.py b/tests/addontests.py index 5fb4f61..5a48e42 100644 --- a/tests/addontests.py +++ b/tests/addontests.py @@ -47,4 +47,9 @@ class AddonTest(unittest.TestCase): def test_get_addon_meta(self): addon._cache = None meta = addon.get_addon_meta("BubbleMessage") - assert meta.keys() == ['mandatory_props', 'class', 'display_name', 'name', 'icon',] + keys = meta.keys() + assert 'mandatory_props' in keys + assert 'class' in keys + assert 'display_name' in keys + assert 'name' in keys + assert 'icon' in keys diff --git a/tutorius/addon.py b/tutorius/addon.py index 7ac68f7..30b7a63 100644 --- a/tutorius/addon.py +++ b/tutorius/addon.py @@ -65,10 +65,10 @@ def create(name, *args, **kwargs): try: return comp_metadata['class'](*args, **kwargs) except: - logging.error("Could not instantiate %s with parameters %s, %s"%(comp_metadata['name'],str(args), str(kwargs))) + logging.debug("Could not instantiate %s with parameters %s, %s"%(comp_metadata['name'],str(args), str(kwargs))) return None except KeyError: - logging.error("Addon not found for class '%s'", name) + logging.debug("Addon not found for class '%s'", name) return None def list_addons(): |