mirror of https://github.com/logos-co/open-law.git
fix test build qa url
This commit is contained in:
parent
1bdf045adc
commit
03e20b4a61
|
@ -4,15 +4,25 @@ from flask import current_app as Response
|
||||||
from app.controllers.jinja_globals import (
|
from app.controllers.jinja_globals import (
|
||||||
build_qa_url_using_interpretation,
|
build_qa_url_using_interpretation,
|
||||||
)
|
)
|
||||||
from .utils import create_test_book, login
|
from .utils import (
|
||||||
|
create_book,
|
||||||
|
login,
|
||||||
|
create_collection,
|
||||||
|
create_section,
|
||||||
|
create_interpretation,
|
||||||
|
create_comment,
|
||||||
|
)
|
||||||
from app import models as m
|
from app import models as m
|
||||||
|
|
||||||
|
|
||||||
def test_build_qa_url_using_interpretation(client: FlaskClient):
|
def test_build_qa_url_using_interpretation(client: FlaskClient):
|
||||||
_, user = login(client)
|
login(client)
|
||||||
user: m.User
|
|
||||||
|
|
||||||
create_test_book(user.id)
|
book = create_book(client)
|
||||||
|
collection, _ = create_collection(client, book.id)
|
||||||
|
section, _ = create_section(client, book.id, collection.id)
|
||||||
|
interpretation, _ = create_interpretation(client, book.id, section.id)
|
||||||
|
create_comment(client, book.id, interpretation.id)
|
||||||
|
|
||||||
interpretation: m.Interpretation = m.Interpretation.query.first()
|
interpretation: m.Interpretation = m.Interpretation.query.first()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue