fix linting issues from #79 #79
@ -10,7 +10,7 @@ from app import app, db, migrate
|
|||||||
from ki.actions import seed
|
from ki.actions import seed
|
||||||
from ki.models import Skill
|
from ki.models import Skill
|
||||||
|
|
||||||
from sqlalchemy import select
|
# from sqlalchemy import select
|
||||||
|
|
||||||
|
|
||||||
class ApiTest(unittest.TestCase):
|
class ApiTest(unittest.TestCase):
|
||||||
@ -37,17 +37,14 @@ class ApiTest(unittest.TestCase):
|
|||||||
# print(skill_obj)
|
# print(skill_obj)
|
||||||
# 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)
|
||||||
## .order_by(Skill.id.desc())
|
# .order_by(Skill.id.desc())
|
||||||
# ).scalar_one()
|
# ).scalar_one()
|
||||||
print(max_skill)
|
print(max_skill)
|
||||||
print("max_skill done")
|
print("max_skill done")
|
||||||
|
Loading…
Reference in New Issue
Block a user