コード例 #1
0
 def setUp(self):
     self.app = create_app("testing")
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.drop_all()
     db.create_all()
     u = User(username=self.default_username)
     u.hash_password(self.default_password)
     u.save()
     g.user = u
     bucketlist = BucketList(name=self.default_bucketlist)
     bucketlist.create()
     bucketlist.save()
     item = BucketItem(name=self.default_bucketlistitem, bucketlist_id=bucketlist.id)
     item.create()
     item.save()
     self.client = self.app.test_client()
コード例 #2
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.drop_all()
     db.create_all()
     u = User(username=self.default_username)
     u.hash_password(self.default_password)
     u.save()
     g.user = u
     bucketlist = BucketList(name=self.default_bucketlist)
     bucketlist.create()
     bucketlist.save()
     item = BucketItem(name=self.default_bucketlistitem,
                       bucketlist_id=bucketlist.id)
     item.create()
     item.save()
     self.client = self.app.test_client()