Changeset 1817


Ignore:
Timestamp:
05/12/06 12:46:25 (13 years ago)
Author:
spascoe
Message:

Test case not working (BASEDIR isn't set properly). Need to look at
ConfigParser? semantics.

Location:
TI03-DataExtractor/branches/repackaging/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI03-DataExtractor/branches/repackaging/server/lib/ndg/dx/server/test/__init__.py

    r1815 r1817  
    77import unittest, os, pkg_resources, tempfile, shutil 
    88from ndg.utils.config import config 
    9 from nbg.dx.server.scripts import DXWSInterface 
    109 
    1110class TestCase(unittest.TestCase): 
     
    2221 
    2322        # Copy dxs to tempdir to preserve state. 
    24         shutil.copytree(dxsPath, os.path.join(self.tempdir, 'dxs')) 
     23        basedir = os.path.join(self.tempdir, 'dxs') 
     24        print 'Copying %s to %s' % (dxsPath, basedir) 
     25        shutil.copytree(dxsPath, basedir) 
     26 
     27        # Set BASEDIR 
     28        config.set('ndg.dx.server', 'BASEDIR', basedir) 
     29 
    2530 
    2631    def testStartSession(self): 
     32        from ndg.dx.server.scripts import DXWSInterface 
     33 
     34        from ndg.utils.config import config 
     35        print 'BASEDIR = %s' % config.get('ndg.dx.server', 'BASEDIR') 
     36        print 'SESSION_OBJECT_DIR = %s' % config.get('ndg.dx.server', 'SESSION_OBJECT_DIR') 
     37        print 'INPUT_DATASETS_FILE = %s' % config.get('ndg.dx.server', 'INPUT_DATASETS_FILE') 
     38     
     39 
    2740        print DXWSInterface.startSession('rob', 'rob1') 
    2841 
  • TI03-DataExtractor/branches/repackaging/server/setup.py

    r1815 r1817  
    4040    include_package_data = True, 
    4141 
    42 #    test_suite = 'ndg.dx.server.test.test_suite', 
     42    test_suite = 'ndg.dx.server.test.test_suite', 
    4343    ) 
    4444     
Note: See TracChangeset for help on using the changeset viewer.