pecan/scaffolds/base/+package+/tests/__init__.py_tmpl
raw| 1 | import os |
| 2 | from unittest import TestCase |
| 3 | from pecan import set_config |
| 4 | from pecan.testing import load_test_app |
| 5 | |
| 6 | __all__ = ['FunctionalTest'] |
| 7 | |
| 8 | |
| 9 | class FunctionalTest(TestCase): |
| 10 | """ |
| 11 | Used for functional tests where you need to test your |
| 12 | literal application and its integration with the framework. |
| 13 | """ |
| 14 | |
| 15 | def setUp(self): |
| 16 | self.app = load_test_app(os.path.join( |
| 17 | os.path.dirname(__file__), |
| 18 | 'config.py' |
| 19 | )) |
| 20 | |
| 21 | def tearDown(self): |
| 22 | set_config({}, overwrite=True) |