A base test case.
| 5 | |
| 6 | |
| 7 | class BaseTestCase(TestCase): |
| 8 | """A base test case.""" |
| 9 | |
| 10 | def create_app(self): |
| 11 | app.config.from_object('config.TestConfig') |
| 12 | return app |
| 13 | |
| 14 | def setUp(self): |
| 15 | db.create_all() |
| 16 | db.session.add(User("admin", "ad@min.com", "admin")) |
| 17 | db.session.add( |
| 18 | BlogPost("Test post", "This is a test. Only a test.", "admin")) |
| 19 | db.session.commit() |
| 20 | |
| 21 | def tearDown(self): |
| 22 | db.session.remove() |
| 23 | db.drop_all() |
nothing calls this directly
no outgoing calls
no test coverage detected