This commit is contained in:
parent
86c2d7e84a
commit
4529b07d54
@ -25,7 +25,6 @@ class ApiTest(unittest.TestCase):
|
|||||||
self.client = app.test_client()
|
self.client = app.test_client()
|
||||||
|
|
||||||
config = migrate.get_config()
|
config = migrate.get_config()
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
command.upgrade(config, "head")
|
command.upgrade(config, "head")
|
||||||
seed(True)
|
seed(True)
|
||||||
@ -37,9 +36,9 @@ class ApiTest(unittest.TestCase):
|
|||||||
# statement = select(Skill.id)
|
# statement = select(Skill.id)
|
||||||
# print(statement)
|
# print(statement)
|
||||||
# max_skill = db.session.Skill().order_by(Skill.id.desc()).first()
|
# max_skill = db.session.Skill().order_by(Skill.id.desc()).first()
|
||||||
# max_skill = Skill.query.order_by(Skill.id.desc()).first() # TODO: problematic
|
# max_skill = Skill.query.order_by(Skill.id.desc()).first() # TODO: problematic
|
||||||
with db.session.no_autoflush: # only works on first test run
|
with db.session.no_autoflush: # only works on first test run
|
||||||
max_skill = db.session.query(Skill).order_by(Skill.id.desc()).first() # TODO: also problematic,
|
max_skill = db.session.query(Skill).order_by(Skill.id.desc()).first() # TODO: also problematic,
|
||||||
# skills = db.session.execute(db.select(Skill)).scalars()
|
# skills = db.session.execute(db.select(Skill)).scalars()
|
||||||
# print(max_skill)
|
# print(max_skill)
|
||||||
# max_skill = db.session.execute(db.select(Skill)
|
# max_skill = db.session.execute(db.select(Skill)
|
||||||
|
Loading…
Reference in New Issue
Block a user