import unittest from almanac.DAOs.braintree.customer_dao import CustomerDAO from almanac.exc.exceptions import DAOException from almanac.models import db, CustomerTable as Customer, UserTable as User from almanac.almanac import create_app app = create_app(None) class TestCustomerDAOTestCase(unittest.TestCase): @classmethod def setUpClass(cls): with app.app_context(): db.drop_all() db.create_all() cls.test_dao = CustomerDAO() def setUp(self): with app.app_context(): test_user = User( '*****@*****.**', 'testpw', 'US/Central', 'test6', ) self.test_uid = test_user.public_id self.test_user_email = test_user.email
from almanac.almanac import create_app app = create_app("test")
from almanac.almanac import create_app if __name__ == '__main__': create_app("test.txt").run()