<commit_before>import gevent
from mock import Mock
from unittest import SkipTest
from nose.plugins.attrib import attr
import unittest

from pyon.util.containers import DotDict
from pyon.util.unit_test import PyonTestCase
from pyon.util.int_test import IonIntegrationTestCase
from pyon.core.exception import NotFound, BadRequest
from pyon.public import CFG

from interface.services.cei.iprocess_dispatcher_service import ProcessDispatcherServiceClient
from interface.objects import ProcessDefinition, ProcessSchedule, ProcessTarget

from ion.processes.data.transforms.transform_example import TransformExample
from ion.services.cei.process_dispatcher_service import ProcessDispatcherService,\
    PDLocalBackend, PDBridgeBackend


@attr('UNIT',group='cei')
class ProcessDispatcherServiceTest(PyonTestCase):

    def setUp(self):
        mock_clients = self._create_service_mock('process_dispatcher')
        self.pd_service = ProcessDispatcherService()
        self.pd_service.clients = mock_clients<commit_msg>Add missing import to process dispatcher test<commit_after>import gevent
from mock import Mock
from unittest import SkipTest
from nose.plugins.attrib import attr
import unittest, os

from pyon.util.containers import DotDict
from pyon.util.unit_test import PyonTestCase
from pyon.util.int_test import IonIntegrationTestCase
from pyon.core.exception import NotFound, BadRequest
from pyon.public import CFG

from interface.services.cei.iprocess_dispatcher_service import ProcessDispatcherServiceClient
from interface.objects import ProcessDefinition, ProcessSchedule, ProcessTarget

from ion.processes.data.transforms.transform_example import TransformExample
from ion.services.cei.process_dispatcher_service import ProcessDispatcherService,\
    PDLocalBackend, PDBridgeBackend


@attr('UNIT',group='cei')
class ProcessDispatcherServiceTest(PyonTestCase):

    def setUp(self):
        mock_clients = self._create_service_mock('process_dispatcher')
        self.pd_service = ProcessDispatcherService()
        self.pd_service.clients = mock_clients
{'fraction_non_alphanumeric': 0.05787937743190662, 'fraction_numerical': 0.0, 'mean_word_length': 6.399280575539568, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5306303', 'n_tokens_mistral': 560, 'n_tokens_neox': 541, 'n_words': 142}