generated from john/python-template
V5.1 Modify Person table: split full name into first & last, added tags support
Quality Gate / gate (push) Failing after 11s
Quality Gate / gate (push) Failing after 11s
This commit is contained in:
@@ -168,9 +168,15 @@ def test_export_import_migration_backfills_legacy_portraits_and_homepage_images(
|
||||
target_engine = create_engine(target_db_url)
|
||||
try:
|
||||
with target_engine.connect() as connection:
|
||||
person_name = connection.execute(
|
||||
text('select given_names, last_name from "person" where id = :id'),
|
||||
{"id": person_id},
|
||||
).one()
|
||||
photos = connection.execute(
|
||||
text('select person_id, path, is_primary from "photo" order by person_id is not null desc, created_at asc')
|
||||
).all()
|
||||
assert person_name[0] == "Legacy"
|
||||
assert person_name[1] == "Portrait"
|
||||
assert len(photos) == 2
|
||||
person_photo = next(row for row in photos if row[0] is not None)
|
||||
homepage_photo = next(row for row in photos if row[0] is None)
|
||||
|
||||
Reference in New Issue
Block a user