source: TI12-security/trunk/python/ndg.security.test/ndg/security/test/__init__.py @ 4840

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.test/ndg/security/test/__init__.py@4840
Revision 4840, 1.0 KB checked in by pjkersha, 11 years ago (diff)

Fix problem with search and replace licence not adding a new line.

  • Property svn:keywords set to Id
Line 
1"""NDG Security Unit test package
2
3NERC Data Grid Project
4"""
5__author__ = "P J Kershaw"
6__date__ = "24/12/08"
7__copyright__ = "(C) 2009 Science and Technology Facilities Council"
8__license__ = "BSD - see LICENSE file in top-level directory"
9__contact__ = "Philip.Kershaw@stfc.ac.uk"
10__revision__ = '$Id$'
11
12import unittest
13import logging
14logging.basicConfig()
15
16import os
17from os.path import expandvars as xpdVars
18from os.path import join as jnPath
19
20
21class BaseTestCase(unittest.TestCase):
22    '''Convenience base class from which other unit tests can extend.  Its
23    sets the generic data directory path'''
24    configDirEnvVarName = 'NDGSEC_UNITTEST_CONFIG_DIR'
25   
26    def setUp(self):
27        if BaseTestCase.configDirEnvVarName not in os.environ:
28            os.environ[BaseTestCase.configDirEnvVarName] = \
29                os.path.join(os.path.abspath(os.path.dirname(__file__)),
30                             'config')
31
32mkDataDirPath = lambda file:jnPath(os.environ[BaseTestCase.configDirEnvVarName],
33                                   file)
34
Note: See TracBrowser for help on using the repository browser.