def test_from_file_configuration(self):
     test_manager = BasicExporter.from_file_configuration('./tests/data/basic_config.json')
     try:
         self.assertIsInstance(test_manager, BasicExporter)
         test_manager._clean_export_job()
     finally:
         test_manager.persistence.delete()
Exemple #2
0
 def test_from_file_configuration(self):
     test_manager = BasicExporter.from_file_configuration(
         './tests/data/basic_config.json')
     try:
         self.assertIsInstance(test_manager, BasicExporter)
         test_manager._clean_export_job()
     finally:
         test_manager.persistence.delete()
Exemple #3
0
def run(args):
    try:
        if args.resume:
            exporter = BasicExporter.from_persistence_configuration(args.resume)
        else:
            exporter = BasicExporter.from_file_configuration(args.config)
    except ConfigurationError as e:
        logging.error(e)
    else:
        exporter.export()
Exemple #4
0
def run(args):
    try:
        if args.resume:
            exporter = BasicExporter.from_persistence_configuration(
                args.resume)
        else:
            exporter = BasicExporter.from_file_configuration(args.config)
    except ConfigurationError as e:
        logging.error(e)
    else:
        exporter.export()