

@mock.patch.object(os.path, 'exists', mock.MagicMock(return_value=True))
def test_process(self):
    some_execution = self.saved_executions.values()[5]
    exec_exporter = ExecutionsExporter(None, None)
    self.assertEqual(exec_exporter.pending_executions.qsize(), 0)
    exec_exporter.process(some_execution)
    self.assertEqual(exec_exporter.pending_executions.qsize(), 1)
    some_execution.status = 'scheduled'
    exec_exporter.process(some_execution)
    self.assertEqual(exec_exporter.pending_executions.qsize(), 1)

dataset/ETHPy150Open StackStorm/st2/st2exporter/tests/integration/test_export_worker.py TestExportWorker.test_process/original