# Path: pyfusion/test/tests.py
# class PfTestBase(object):
#     """Base class for generated sql and non-sql test cases."""
#     pass
# 
# class BasePyfusionTestCase(unittest.TestCase):
#     """Simple customisation of TestCase."""
#     def __init__(self, *args):
#         self.listed_device = CONFIG_TEST_DEVICE_NAME
#         self.listed_empty_device = CONFIG_EMPTY_TEST_DEVICE_NAME
#         self.unlisted_device = NONCONFIG_TEST_DEVICE_NAME
#         self.shot_number = TEST_SHOT_NUMBER
#         self.unlisted_config_section_type = UNLISTED_CONFIG_SECTION_TYPE
#         unittest.TestCase.__init__(self, *args)
# 
# Path: pyfusion/data/base.py
# class BaseData(object):
#     """Base class for handling processed data.
# 
#     In general, specialised subclasses of BaseData will be used
#     to handle processed data rather than BaseData itself.
# 
#     Usage: ..........
#     """
#     __metaclass__ = MetaMethods
# 
#     def __init__(self):
#         self.meta = PfMetaData()
#         self.history = "%s > New %s" %(datetime.now(), self.__class__.__name__)
#         if not hasattr(self, 'channels'):
#             self.channels = ChannelList()
#         
#     def save(self):
#         if pyfusion.orm_manager.IS_ACTIVE:
#             # this may be inefficient: get it working, then get it fast
#             self.channels.save()
#             session = pyfusion.orm_manager.Session()
#             session.add(self)
#             session.commit()
#             session.close()


import os
import pyfusion
        import pyfusion
        import pyfusion
from pyfusion.test.tests import PfTestBase, BasePyfusionTestCase
from pyfusion.data.base import BaseData
    from pyfusion.acquisition.MDSPlus.fetch import MDSPlusBaseDataFetcher
    from pyfusion.data.base import BaseData as MDSPlusBaseDataFetcher
        from pyfusion.acquisition.MDSPlus.acq import MDSPlusAcquisition
        from pyfusion.acquisition.base import BaseAcquisition
        from pyfusion.acquisition.MDSPlus.acq import MDSPlusAcquisition
        from pyfusion.acquisition.base import BaseDataFetcher
        from pyfusion.acquisition.MDSPlus.fetch import MDSPlusDataFetcher
        from pyfusion.acquisition.MDSPlus.acq import MDSPlusAcquisition
        from pyfusion.data.timeseries import TimeseriesData
        from pyfusion.acquisition.utils import get_acq_from_config

    def test_thin_client_access(self):
        shot = -1
        test_acq = pyfusion.getAcquisition('test_thin_client') 
        test_data = test_acq.getdata(shot, 'test_signal')

TestRefactoredMDSThin.net = True

class TestRefactoredMDSThick(MDSAcqTestCase):
    """Test thick client data access with the refactored MDS interface.

    The refactored MDSplus package uses the same acquisition and fetcher
    classes for  the different MDSplus access modes  (local, thin client
    and thick client).
    """

    def test_thick_client_access(self):
        shot = -1
        test_acq = pyfusion.getAcquisition('test_thick_client') 
        test_data = test_acq.getdata(shot, 'test_signal')

TestRefactoredMDSThick.net = True


###
### Tests for web interface
### 

WEBTEST_CONFIG_FILE = os.path.join(TEST_DATA_PATH, "webtest.cfg")


# Path: pyfusion/test/tests.py
# class PfTestBase(object):
#     """Base class for generated sql and non-sql test cases."""
#     pass
# 
# class BasePyfusionTestCase(unittest.TestCase):
#     """Simple customisation of TestCase."""
#     def __init__(self, *args):
#         self.listed_device = CONFIG_TEST_DEVICE_NAME
#         self.listed_empty_device = CONFIG_EMPTY_TEST_DEVICE_NAME
#         self.unlisted_device = NONCONFIG_TEST_DEVICE_NAME
#         self.shot_number = TEST_SHOT_NUMBER
#         self.unlisted_config_section_type = UNLISTED_CONFIG_SECTION_TYPE
#         unittest.TestCase.__init__(self, *args)
# 
# Path: pyfusion/data/base.py
# class BaseData(object):
#     """Base class for handling processed data.
# 
#     In general, specialised subclasses of BaseData will be used
#     to handle processed data rather than BaseData itself.
# 
#     Usage: ..........
#     """
#     __metaclass__ = MetaMethods
# 
#     def __init__(self):
#         self.meta = PfMetaData()
#         self.history = "%s > New %s" %(datetime.now(), self.__class__.__name__)
#         if not hasattr(self, 'channels'):
#             self.channels = ChannelList()
#         
#     def save(self):
#         if pyfusion.orm_manager.IS_ACTIVE:
#             # this may be inefficient: get it working, then get it fast
#             self.channels.save()
#             session = pyfusion.orm_manager.Session()
#             session.add(self)
#             session.commit()
#             session.close()


# Path: pyfusion/acquisition/MDSPlus/tests.py
import os
import pyfusion
        import pyfusion
        import pyfusion
from pyfusion.test.tests import PfTestBase, BasePyfusionTestCase
from pyfusion.data.base import BaseData
    from pyfusion.acquisition.MDSPlus.fetch import MDSPlusBaseDataFetcher
    from pyfusion.data.base import BaseData as MDSPlusBaseDataFetcher
        from pyfusion.acquisition.MDSPlus.acq import MDSPlusAcquisition
        from pyfusion.acquisition.base import BaseAcquisition
        from pyfusion.acquisition.MDSPlus.acq import MDSPlusAcquisition
        from pyfusion.acquisition.base import BaseDataFetcher
        from pyfusion.acquisition.MDSPlus.fetch import MDSPlusDataFetcher
        from pyfusion.acquisition.MDSPlus.acq import MDSPlusAcquisition
        from pyfusion.data.timeseries import TimeseriesData
        from pyfusion.acquisition.utils import get_acq_from_config


    def test_thin_client_access(self):
        shot = -1
        test_acq = pyfusion.getAcquisition('test_thin_client') 
        test_data = test_acq.getdata(shot, 'test_signal')

TestRefactoredMDSThin.net = True

class TestRefactoredMDSThick(MDSAcqTestCase):
    """Test thick client data access with the refactored MDS interface.

    The refactored MDSplus package uses the same acquisition and fetcher
    classes for  the different MDSplus access modes  (local, thin client
    and thick client).
    """

    def test_thick_client_access(self):
        shot = -1
        test_acq = pyfusion.getAcquisition('test_thick_client') 
        test_data = test_acq.getdata(shot, 'test_signal')

TestRefactoredMDSThick.net = True


###
### Tests for web interface
### 

WEBTEST_CONFIG_FILE = os.path.join(TEST_DATA_PATH, "webtest.cfg")


class WebTestCase(BasePyfusionTestCase):