示例#1
0
 def setUp(self):
     super().setUp()
     db.create_all()
     self.AUTH_TYPE = current_app.config["AUTH_TYPE"]
     self.data = {
         "username": "******",
         "email": "*****@*****.**",
         "password": "******",
     }
     user = UserModel(data=self.data)
     user.save()
     db.session.commit()
     self.data.pop("email")
示例#2
0
 def setUp(self):
     super().setUp()
     db.create_all()
     self.AUTH_TYPE = current_app.config["AUTH_TYPE"]
     self.data = {
         "username": "******",
         "email": "*****@*****.**",
         "password": "******",
     }
     user = UserModel(data=self.data)
     user.save()
     db.session.commit()
     # we take out the email, we do not need it to log in
     self.data.pop("email")
     self.idx = UserModel.query.filter_by(username="******").first().id