forked from kompetenzinventar/ki-backend
add skills integration test
This commit is contained in:
@ -4,11 +4,11 @@ from ki.models import Language, Skill
|
||||
from app import app, db
|
||||
|
||||
|
||||
@app.cli.command("seed")
|
||||
def seed():
|
||||
|
||||
skill_seed_file_path = app.config["KI_DATA_DIR"] + "/seed_data/skills.csv"
|
||||
|
||||
print("importing skills")
|
||||
|
||||
with open(skill_seed_file_path) as skills_file:
|
||||
skills_csv_reader = csv.DictReader(skills_file)
|
||||
|
||||
@ -32,3 +32,8 @@ def seed():
|
||||
db.session.add(Language(id=iso["639-1"], name=iso["Sprache"]))
|
||||
|
||||
db.session.commit()
|
||||
|
||||
|
||||
@app.cli.command("seed")
|
||||
def seed_command():
|
||||
seed()
|
||||
|
Reference in New Issue
Block a user