Exemple #1
0
 def test_should_load_all_plugin_from_plugins_folder(self):
     files = os.list_matched_files(os.path.join(settings.PROJECT_DIR, 'plugins'));
     count_of_init_py = 1
     count = len(files) - count_of_init_py
 
     plugins = Plugins.INSTANCE()
     plugins.load_plugins()
     self.assertEquals(count, len(plugins))
Exemple #2
0
 def load_plugins(self):        
     files = os.list_matched_files(self.plugins_folder);
     for file in files:
         self.current_plugin = Plugin(file)
         try:
             execfile(os.path.join(self.plugins_folder, file))
         except Exception, e:
             pass
Exemple #3
0
 def anonymous(config): 
     try:    
         return extract_list(self.abspath(), 'CSV', 'plugins').items()[0][1]
     except Exception, e:
         files = os.list_matched_files(os.path.join(settings.PROJECT_DIR, 'plugins'), '.*.py')
         files.remove('__init__.py')
         files.sort()
         return files
Exemple #4
0
    def test_should_generate_tar_file_with_all_csvs(self):
        self.assertEquals(False, os.path.exists(self.tar_file))
        group = Groups().default()
        group.id = 'default'
        group.configs = self.configs
        pg = ProjectGroup.create(group)

        tar = Tar(self.configs)

        tar.create()
        self.assertEquals(True, os.path.exists(os.path.join(self.configs.results_dir(), 'all.tar')))
        self.utils.extract_tar(os.path.join(self.configs.results_dir(), 'all.tar'), self.utils.temp_dir())
        files = os.list_matched_files(self.utils.temp_dir(), ".*")
        self.assertEquals(4, len(files))