Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Attributes
Archetypes.tests.test_sqlstorage.GadflyMagic Class Reference
Inheritance diagram for Archetypes.tests.test_sqlstorage.GadflyMagic:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def afterClear

Static Public Attributes

tuple gadfly_dir = os.path.join(PACKAGE_HOME, 'gadfly')
tuple demo_dir = os.path.join(gadfly_dir, 'demo')

Private Attributes

 _data_dir

Detailed Description

Make Gadfly tests work out of the box 

Definition at line 249 of file test_sqlstorage.py.


Member Function Documentation

Definition at line 264 of file test_sqlstorage.py.

00264 
00265     def afterClear(self):
00266         # Restore Gadfly config
00267         if hasattr(self, '_data_dir'):
00268             from Products.ZGadflyDA import db
00269             db.data_dir = self._data_dir
00270         # Remove Gadfly database
00271         if os.path.isdir(self.gadfly_dir):
00272             import shutil
00273             shutil.rmtree(self.gadfly_dir, 1)
00274 

Reimplemented in Archetypes.tests.test_sqlstorage.SQLStorageTestBase.

Definition at line 255 of file test_sqlstorage.py.

00255 
00256     def afterSetUp(self):
00257         # Patch Gadfly to work off the temp dir
00258         from Products.ZGadflyDA import db
00259         self._data_dir = db.data_dir
00260         db.data_dir = self.gadfly_dir
00261         # Create Gadfly database
00262         os.mkdir(self.gadfly_dir)
00263         os.mkdir(self.demo_dir)


Member Data Documentation

Definition at line 258 of file test_sqlstorage.py.

tuple Archetypes.tests.test_sqlstorage.GadflyMagic.demo_dir = os.path.join(gadfly_dir, 'demo') [static]

Definition at line 253 of file test_sqlstorage.py.

tuple Archetypes.tests.test_sqlstorage.GadflyMagic.gadfly_dir = os.path.join(PACKAGE_HOME, 'gadfly') [static]

Definition at line 252 of file test_sqlstorage.py.


The documentation for this class was generated from the following file: