Package install :: Package MoSTBioDat :: Package DataBase :: Package ForgetSQL2 :: Module testforgetsql2 :: Class TestFramework
[hide private]
[frames] | no frames]

Class TestFramework

source code

       object --+    
                |    
unittest.TestCase --+
                    |
                   TestFramework
Known Subclasses:

Nested Classes [hide private]

Inherited from unittest.TestCase: failureException

Instance Methods [hide private]
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
tearDown(self)
Hook method for deconstructing the test fixture after testing it.
source code
 
prepareClasses(self)
Prepare subclasses of Database and TableBuilder.
source code
 
prepareLogger(self)
Make logger use a buffer instead of stderr.
source code
 
lastLog(self)
Returns what's been logged since last call.
source code
 
prepareDatabase(self) source code
 
prepareDatabaseMysql(self) source code
 
prepareDatabasePostgresql(self) source code
 
prepareDatabaseSqlite(self) source code
 
prepareTables(self) source code

Inherited from unittest.TestCase: __call__, __init__, __repr__, __str__, assertAlmostEqual, assertAlmostEquals, assertEqual, assertEquals, assertFalse, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertRaises, assertTrue, assert_, countTestCases, debug, defaultTestResult, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, run, shortDescription

Inherited from unittest.TestCase (private): _exc_info

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Class Variables [hide private]
  db_mod = 'sqlite'
  db_connect = None
  prepared = False
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

setUp(self)

source code 

Hook method for setting up the test fixture before exercising it.

Overrides: unittest.TestCase.setUp
(inherited documentation)

tearDown(self)

source code 

Hook method for deconstructing the test fixture after testing it.

Overrides: unittest.TestCase.tearDown
(inherited documentation)

prepareClasses(self)

source code 

Prepare subclasses of Database and TableBuilder.

The reason for this is to introduce the _db-class method without modifying the actual Database class.

The new subclasses are accessible as self.Database and self.TableBuilder.

prepareLogger(self)

source code 

Make logger use a buffer instead of stderr.

The lines logged (format: "WARNING: asdlksldk") can be fetched with the method lastLog.