def setUp(self):
     app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///' + \
         os.path.join(basedir, 'storage/test_catalog.db')
     app.config['TESTING'] = True
     app.config['WTF_CSRF_ENABLED'] = False;
     self.app = app.test_client()
     db.create_all()
from cat_app import db
from cat_app.models import Product, Category

db.drop_all()
db.create_all()

design = Category(name='Design')
process = Category(name='Process')
prog = Category(name='Programming')
music = Category(name='Music')

prods = [
    Product({"name":"Peopleware",
            "subhead":"Productive Projects and Teams",
            "description":"Few books in computing have had as profound an influence on software management as Peopleware . The unique insight of this longtime best seller is that the major issues of software development are human, not technical. They’re not easy issues; but solve them, and you’ll maximize your chances of success.",
            "category":prog,
            "author":"Tom DeMarco",
            "year":2013}),
    Product({"name":"The Mythical Man-Month",
            "subhead":"Essays on Software Engineering, Anniversary Edition",
            "description":"Few books on software project management have been as influential and timeless as The Mythical Man-Month. With a blend of software engineering facts and thought-provoking opinions, Fred Brooks offers insight for anyone managing complex projects. These essays draw from his experience as project manager for the IBM System/360 computer family and then for OS/360, its massive software system. Now, 20 years after the initial publication of his book, Brooks has revisited his original ideas and added new thoughts and advice, both for readers already familiar with his work and for readers discovering it for the first time.",
            "category":prog,
            "author":"Frederick P. Brooks Jr.",
            "year":1995}),
    Product({"name":"Clean Code",
            "subhead":"A Handbook of Agile Software Craftsmanship",
            "description":"Even bad code can function. But if code isn’t clean, it can bring a development organization to its knees. Every year, countless hours and significant resources are lost because of poorly written code. But it doesn’t have to be that way.",
            "category":prog,
            "author":"Robert C. Martin",
            "year":2008}),
    Product({"name":"Extreme Programming Explained",