mirror of https://github.com/logos-co/open-law.git
fix test
This commit is contained in:
parent
e3cfda9fff
commit
3a48f05388
|
@ -114,14 +114,14 @@ def create_dummy_data():
|
||||||
|
|
||||||
interpretation_1 = m.Interpretation(
|
interpretation_1 = m.Interpretation(
|
||||||
label="Dummy Interpretation 1 Label",
|
label="Dummy Interpretation 1 Label",
|
||||||
about="Dummy Interpretation 1 About",
|
text="Dummy Interpretation 1 About",
|
||||||
section_id=section_1_1.id,
|
section_id=section_1_1.id,
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
).save()
|
).save()
|
||||||
|
|
||||||
interpretation_2 = m.Interpretation(
|
interpretation_2 = m.Interpretation(
|
||||||
label="Dummy Interpretation 2 Label",
|
label="Dummy Interpretation 2 Label",
|
||||||
about="Dummy Interpretation 2 About",
|
text="Dummy Interpretation 2 About",
|
||||||
section_id=section_2_1_1.id,
|
section_id=section_2_1_1.id,
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
marked=True,
|
marked=True,
|
||||||
|
@ -129,7 +129,7 @@ def create_dummy_data():
|
||||||
|
|
||||||
interpretation_3 = m.Interpretation(
|
interpretation_3 = m.Interpretation(
|
||||||
label="Dummy Interpretation 3 Label",
|
label="Dummy Interpretation 3 Label",
|
||||||
about="Dummy Interpretation 3 About",
|
text="Dummy Interpretation 3 About",
|
||||||
section_id=section_2_1_2.id,
|
section_id=section_2_1_2.id,
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
marked=True,
|
marked=True,
|
||||||
|
@ -137,7 +137,7 @@ def create_dummy_data():
|
||||||
|
|
||||||
m.Interpretation(
|
m.Interpretation(
|
||||||
label="Dummy Interpretation 4 Label",
|
label="Dummy Interpretation 4 Label",
|
||||||
about="Dummy Interpretation 4 About",
|
text="Dummy Interpretation 4 About",
|
||||||
section_id=section_2_1_2.id,
|
section_id=section_2_1_2.id,
|
||||||
user_id=user.id,
|
user_id=user.id,
|
||||||
).save()
|
).save()
|
||||||
|
|
|
@ -5,7 +5,7 @@ from app import models as m
|
||||||
|
|
||||||
def test_dummy_data(runner: FlaskCliRunner):
|
def test_dummy_data(runner: FlaskCliRunner):
|
||||||
res: Result = runner.invoke(args=["db-populate"])
|
res: Result = runner.invoke(args=["db-populate"])
|
||||||
assert "Dummy data added" in res.output
|
assert "Dummy data added" in res.output, res.stderr
|
||||||
|
|
||||||
user: m.User = m.User.query.filter_by(username="Dummy User 1").first()
|
user: m.User = m.User.query.filter_by(username="Dummy User 1").first()
|
||||||
book: m.Book = m.Book.query.filter_by(label="Dummy Book").first()
|
book: m.Book = m.Book.query.filter_by(label="Dummy Book").first()
|
||||||
|
@ -101,7 +101,6 @@ def test_dummy_data(runner: FlaskCliRunner):
|
||||||
assert subcollection_2_1
|
assert subcollection_2_1
|
||||||
assert subcollection_2_1.is_leaf
|
assert subcollection_2_1.is_leaf
|
||||||
assert not subcollection_2_1.is_root
|
assert not subcollection_2_1.is_root
|
||||||
assert not subcollection_2_1.version
|
|
||||||
|
|
||||||
# root
|
# root
|
||||||
# - collection 1 (leaf)
|
# - collection 1 (leaf)
|
||||||
|
|
Loading…
Reference in New Issue