2019-07-08 08:52:36 +00:00
|
|
|
from app import create_app, db
|
2021-09-15 10:31:53 +00:00
|
|
|
from flask import current_app
|
2021-11-15 13:10:28 +00:00
|
|
|
from tests import TestConfig
|
2021-09-15 10:31:53 +00:00
|
|
|
import unittest
|
2019-07-08 08:52:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
class BasicsTestCase(unittest.TestCase):
|
|
|
|
def setUp(self):
|
2021-09-15 10:31:53 +00:00
|
|
|
self.app = create_app(TestConfig)
|
2019-07-08 08:52:36 +00:00
|
|
|
self.app_context = self.app.app_context()
|
|
|
|
self.app_context.push()
|
|
|
|
db.create_all()
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
db.session.remove()
|
|
|
|
db.drop_all()
|
|
|
|
self.app_context.pop()
|
|
|
|
|
|
|
|
def test_app_exists(self):
|
|
|
|
self.assertFalse(current_app is None)
|