def setUp(self): """ Runs before each test """ """ Initialize the Cloudant database """ self.app = app.app.test_client() Inventory.init_db("tests_inventory") Inventory.remove_all() Inventory("tools", "widget1", True, "new", 1).save() Inventory("materials", "widget2", False, "old", 2).save()
def init_db(): """ Initialies the Cloudant app """ global app Inventory.init_db(app)
def setUp(self): Inventory.init_db("test") Inventory.remove_all()