Esempio n. 1
0
 def test_prepare_metadata(self):
     """Test we can generate the metadata."""
     temp_path = temp_dir()
     iface = QgisInterface(None)
     builder = PluginBuilder(iface)
     builder.plugin_path = temp_path
     builder._prepare_results_html(self.specification)
Esempio n. 2
0
 def test_prepare_readme(self):
     """Test we can generate the readme ok."""
     temp_path = temp_dir()
     iface = QgisInterface(None)
     builder = PluginBuilder(iface)
     builder.plugin_path = temp_path
     builder._prepare_readme(self.specification, 'fake_module')
Esempio n. 3
0
 def test_prepare_code(self):
     """Test the prepare code helper works."""
     temp_path = temp_dir()
     iface = QgisInterface(None)
     builder = PluginBuilder(iface)
     builder.plugin_path = temp_path
     builder._prepare_code(self.specification, temp_path)
Esempio n. 4
0
 def test_prepare_results_html(self):
     """Test the prepare results helper works."""
     temp_path = temp_dir()
     iface = QgisInterface(None)
     builder = PluginBuilder(iface)
     builder.plugin_path = temp_path
     results_popped, template_module_name = builder._prepare_results_html(
         self.specification)
     self.assertIn('You just built a plugin for QGIS!', results_popped)
     self.assertEquals(template_module_name, 'fake_module')