Exemplo n.º 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))
Exemplo n.º 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')
Exemplo n.º 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')
Exemplo n.º 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))