Example #1
0
 def setUp(self):
     """ Runs before each test """
     self.app = service.app.test_client()
     # TestWishlistServer.throttle_api()
     Wishlist.init_db()
     sleep(0.25)
     # TestWishlistServer.throttle_api()
     Wishlist("Wishlist demo 1", "demo user1", [
         service.Wishlist_entry(0, "test11"),
         service.Wishlist_entry(1, "test12")
     ]).save()
     sleep(0.25)
     # TestWishlistServer.throttle_api()
     Wishlist("Wishlist demo 2", "demo user2", [
         service.Wishlist_entry(0, "test21"),
         service.Wishlist_entry(1, "test22")
     ]).save()
     sleep(0.25)
Example #2
0
 def setUp(self):
     """ Initialize the Cloudant database """
     Wishlist.init_db("test")
     Wishlist.remove_all()
	def setUp(self):
		# TestWishlists.throttle_api()
		Wishlist.init_db("test")
		# TestWishlists.throttle_api()
		Wishlist.remove_all()
		sleep(0.25)
Example #4
0
def init_db(dbname="wishlists"):
    """ Initlaize the model """
    Wishlist.init_db(dbname)