def setUp(self): """ Initialize the Cloudant database """ self.app = app.test_client() Pet.init_db("tests") Pet.remove_all() Pet("fido", "dog", True).save() Pet("kitty", "cat", True).save() Pet("harry", "hippo", False).save()
def setUp(self): """ Initialize the Cloudant database """ self.app = app.test_client() Pet.init_db("tests") # Cloudant Lite will rate limit so you must sleep between requests :() sleep(0.5) Pet.remove_all() sleep(0.5) Pet("fido", "dog", True).save() sleep(0.5) Pet("kitty", "cat", True).save() sleep(0.5) Pet("harry", "hippo", False).save() sleep(0.5)
def setUp(self): """ Initialize the Cloudant database """ Pet.init_db("test") Pet.remove_all()
def data_reset(): """ Removes all Pets from the database """ Pet.remove_all()
def pets_reset(): """ Removes all pets from the database """ Pet.remove_all() return make_response('', status.HTTP_204_NO_CONTENT)
def setUp(self): """ Initialize the Redis database """ Pet.init_db() Pet.remove_all()
def data_reset(): """ Removes all Pets from the database """ if app.testing: Pet.remove_all()
def tearDown(self): Pet.remove_all()
def setUp(self): self.app = app.test_client() Pet.init_db("tests") Pet.remove_all()