From 3fb5a3b3f962e74a7720de1895de8d2bc98793e6 Mon Sep 17 00:00:00 2001 From: rafa Date: Mon, 31 Aug 2026 07:47:54 -0400 Subject: [PATCH] =?UTF-8?q?test:=20usar=20--form-string=20para=20el=20camp?= =?UTF-8?q?o=20content=20en=20la=20integraci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit curl -F trata un valor que empieza por "<" como "leer desde este fichero", no como el literal HTML que se pretendía enviar (falla con curl: (26) Failed to open/read local data from file). --form-string evita esa lectura especial. Verificado por Claudix (QA) contra wordpress-web local: con el fix, los 8 casos pasan y Polylang enlaza idioma/grupo/categoría correctamente (56426 es -> 56427 en, grupo {es:56426,en:56427}, categoria 6->3077). --- tests/integration/test_crear_traduccion_api.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 tests/integration/test_crear_traduccion_api.sh diff --git a/tests/integration/test_crear_traduccion_api.sh b/tests/integration/test_crear_traduccion_api.sh old mode 100755 new mode 100644 index 5bd4767..41fa201 --- a/tests/integration/test_crear_traduccion_api.sh +++ b/tests/integration/test_crear_traduccion_api.sh @@ -39,7 +39,7 @@ assert_status 400 "$status" 'status no admitido' "$tmpdir/bad-status.json" status="$(curl -sS -o "$tmpdir/no-such-source.json" -w '%{http_code}' -u "$FEA_TEST_AUTH" -F 'es_id=999999999' -F 'lang=en' "$endpoint")" assert_status 404 "$status" 'post ES inexistente' "$tmpdir/no-such-source.json" -status="$(curl -sS -o "$tmpdir/created.json" -w '%{http_code}' -u "$FEA_TEST_AUTH" -F "es_id=$FEA_TEST_ES_ID" -F 'lang=en' -F 'title=Translation API test' -F 'content=

Body API test

' -F 'excerpt=Excerpt API test' -F 'status=draft' -F 'model=test-model' "$endpoint")" +status="$(curl -sS -o "$tmpdir/created.json" -w '%{http_code}' -u "$FEA_TEST_AUTH" -F "es_id=$FEA_TEST_ES_ID" -F 'lang=en' -F 'title=Translation API test' --form-string 'content=

Body API test

' -F 'excerpt=Excerpt API test' -F 'status=draft' -F 'model=test-model' "$endpoint")" assert_status 201 "$status" 'creación de traducción' "$tmpdir/created.json" python3 - "$tmpdir/created.json" "$FEA_TEST_ES_ID" <<'PY'