From 031a8599aece2b1fbb7b2e573014e0364f5e76fe Mon Sep 17 00:00:00 2001
From: Nicola Soranzo
Date: Mon, 4 Mar 2024 14:39:55 +0000
Subject: [PATCH] Fix ``test_page_encoding`` test
Don't assume that the history has unencoded id 1.
Broken by commit 85630e2ca90211bfaea459192a90b7070c0a024a .
Fix the following error:
```
______________ TestPageJsonEncodingIntegration.test_page_encoding ______________
self =
history_id = '529fd61ab1c6cc36'
def test_page_encoding(self, history_id: str):
request = dict(
slug="mypage",
title="MY PAGE",
content=f"""Page!
""",
)
page_response = self._post("pages", request, json=True)
api_asserts.assert_status_code_is_ok(page_response)
sa_session = self._app.model.session
page_revision = sa_session.scalars(select(model.PageRevision).filter_by(content_format="html")).all()[0]
> assert '''id="History-1"''' in page_revision.content, page_revision.content
E AssertionError: Embedded Galaxy History - 'test_history'
[Do not edit this block; Galaxy will fill it in with the annotated History when it is displayed]
Embedded Galaxy History - \'test_history\'
[Do not edit this block; Galaxy will fill it in with the annotated History when it is displayed]
Embedded Galaxy History - \'test_history\'
[Do not edit this block; Galaxy will fill it in with the annotated History when it is displayed]