Exemple #1
0
 def __init__(self, plugin_path):
     self.plugin_name = utils.basename(plugin_path)
     self.plugin_path = plugin_path
     self.render_ctx = {
         'plugin_name': self.plugin_name,
         'plugin_version': '0.1.0'
     }
Exemple #2
0
 def __init__(self, plugin_path):
     self.plugin_name = utils.basename(plugin_path.rstrip('/'))
     self.plugin_path = plugin_path
     self.render_ctx = {
         'plugin_name': self.plugin_name,
         'plugin_version': '1.0.0'}
     self.template_path = version_mapping.get_plugin_for_version(
         version_mapping.latest_vesion)['templates']
Exemple #3
0
    def __init__(self, plugin_path, package_version=None):
        self.plugin_name = utils.basename(plugin_path.rstrip('/'))
        self.plugin_path = plugin_path
        self.package_version = (package_version or
                                version_mapping.latest_version)

        self.render_ctx = {'plugin_name': self.plugin_name}
        self.template_paths = version_mapping.get_plugin_for_version(
            self.package_version)['templates']
Exemple #4
0
 def __init__(self, plugin_path):
     self.plugin_name = utils.basename(plugin_path)
     self.plugin_path = plugin_path
     self.render_ctx = {
         'plugin_name': self.plugin_name,
         'plugin_version': '0.1.0'}
 def test_basename(self, base_mock):
     path = 'some_path'
     base_mock.return_value = path
     self.assertEqual(utils.basename(path), path)
     base_mock.assert_called_once_with(path)
Exemple #6
0
 def test_basename(self, base_mock):
     path = 'some_path'
     base_mock.return_value = path
     self.assertEqual(utils.basename(path), path)
     base_mock.assert_called_once_with(path)