Additions:
This template reflects a straightforward unit test. With a little ingenuity, it can be adapted to most functional tests.
Deletions:
Additions:
mod = sys.modules[globals()['__name__']]
suite = unittest.TestLoader().loadTestsFromModule(mod)
suite = unittest.TestLoader().loadTestsFromModule(mod)
Deletions:
print "\n%s START TEST: %s %s\n" % ("*"*5, datetime.now(), "*"*5)
print "\n%s END TEST: %s %s\n" % ("*"*5, datetime.now(), "*"*5)
Additions:
"""adapt to your purposes, I like to always include this as a sanity check"""
Deletions:
Additions:
"""adapt to your purposes, I like to always include this as a basic case"""
self.assertTrue(isinstance(self, unittest.TestCase))
self.assertTrue(isinstance(self, unittest.TestCase))
Additions:
# Extend sys.path
#basepath = abspath(osjoin(dirname(__file__), '../..'))
#sys.path.append(osjoin(basepath, 'bin'))
#basepath = abspath(osjoin(dirname(__file__), '../..'))
#sys.path.append(osjoin(basepath, 'bin'))
Additions:
This template reflects a straightforward unit test. Will a little ingenuity, it can be adapted to most functional tests.