feat(api): endpoint para enlazar traducciones Polylang (#222) #225

Merged
rafa merged 2 commits from feat/crear-traduccion-api into main 2026-08-31 11:48:41 +00:00
Showing only changes of commit 3fb5a3b3f9 - Show all commits
+1 -1
View File
@@ -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=<p>Body API test</p>' -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=<p>Body API test</p>' -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'