Beispiel #1
0
 def test_read_xml_config(self):
     '''
     Should read an XML config.
     '''
     config = ToolConfig.create_from_xml(CC_LTI_XML)
     self.assertEqual(normalize_xml(config.to_xml()),
                      normalize_xml(CC_LTI_XML))
Beispiel #2
0
 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')
     self.assertEqual(config.icon, 'http://wil.to/_/beardslap.gif')
     self.assertEqual(config.secure_icon, 'https://www.example.com/secure_icon.png')
Beispiel #3
0
 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')
Beispiel #4
0
 def test_read_xml_config(self):
     '''
     Should read an XML config.
     '''
     config = ToolConfig.create_from_xml(CC_LTI_XML)
     self.assertEqual(normalize_xml(config.to_xml()), normalize_xml(CC_LTI_XML))