diff --git a/src/lti/tool_config.py b/src/lti/tool_config.py index 7348ef5..71dc4fa 100644 --- a/src/lti/tool_config.py +++ b/src/lti/tool_config.py @@ -130,8 +130,8 @@ def process_xml(self, xml): self.secure_icon = child.text if 'cartridge_bundle' in child.tag: self.cartridge_bundle = child.attrib['identifierref'] - if 'catridge_icon' in child.tag: - self.cartridge_icon = child.atrib['identifierref'] + if 'cartridge_icon' in child.tag: + self.cartridge_icon = child.attrib['identifierref'] if 'vendor' in child.tag: # Parse vendor tag diff --git a/tests/test_tool_config.py b/tests/test_tool_config.py index f42b8a0..c02be91 100644 --- a/tests/test_tool_config.py +++ b/tests/test_tool_config.py @@ -171,6 +171,13 @@ def test_optional_config_parameters(self): got = normalize_xml(config.to_xml()) self.assertEqual(got, correct) + def test_can_parse_optional_config_parameters(self): + ''' + Config should have cartridge_icon and blti:icon set + ''' + config = ToolConfig.create_from_xml(CC_LTI_OPTIONAL_PARAMS_XML) + self.assertEqual(config.cartridge_icon, 'BLTI001_Icon') + def test_read_xml_config(self): ''' Should read an XML config.