Support multipart HTML5 forms
This commit is contained in:
@@ -484,6 +484,26 @@ def test_html5_project_index_creates_project_with_fragment():
|
||||
assert deleted_setup.json()["status"] == "NOT_CONFIGURED"
|
||||
|
||||
|
||||
def test_html5_project_create_accepts_multipart_browser_form():
|
||||
client = TestClient(app)
|
||||
project_id = f"html5-multipart-{uuid4()}"
|
||||
|
||||
created = client.post(
|
||||
"/html5/projects",
|
||||
files={
|
||||
"project_id": (None, project_id),
|
||||
"name": (None, "HTML5 Multipart"),
|
||||
},
|
||||
)
|
||||
|
||||
assert created.status_code == 200
|
||||
assert_html5_response_contract(created, project_id, "HTML5 Multipart")
|
||||
|
||||
setup = client.get(f"/html5/projects/{project_id}/setup")
|
||||
assert setup.status_code == 200
|
||||
assert_html5_response_contract(setup, "data-html5-page=\"setup\"", "HTML5 Multipart", full_page=True)
|
||||
|
||||
|
||||
def test_html5_object_context_fragment(tmp_path: Path):
|
||||
project_id = f"html5-object-context-{uuid4()}"
|
||||
(tmp_path / "metadata.xml").write_text(
|
||||
|
||||
Reference in New Issue
Block a user