def setUp(self):
     """ Initialize the Cloudant database """
     self.app = app.test_client()
     Promotion.init_db("tests")
     Promotion.remove_all()
     Promotion("A001", "BOGO", True, 10).save()
     Promotion("A002", "B2GO", True, 10).save()
     Promotion("A003", "B3GO", False, 10).save()
示例#2
0
 def setUp(self):
     """ Initialize the Cloudant database """
     Promotion.init_db("test")
     Promotion.remove_all()
 def setUp(self):
     """ Runs before each test """
     Promotion.init_db("test")
     Promotion.remove_all()
def promotions_reset():
    """ Removes all promotions from the database """
    Promotion.remove_all()
    return make_response('', status.HTTP_204_NO_CONTENT)
 def setUp(self):
     """ Runs before each test """
     Promotion.init_db("test")
     Promotion.remove_all()
     self.app = app.test_client()