Commit 20d2e959 authored by Jérome Perrin's avatar Jérome Perrin

test: fix the way to do a POST request using self.publish

This test is in expectedFailure state and is still not passing with this
change, but this test was showing wrong example that can cause
confusion.
parent 7663cc59
......@@ -31,6 +31,8 @@
import re
import unittest
from unittest import expectedFailure, skip
from StringIO import StringIO
from urllib import urlencode
from AccessControl import Unauthorized
from Testing import ZopeTestCase
from DateTime import DateTime
......@@ -1259,14 +1261,14 @@ Hé Hé Hé!""", page.asText().strip())
language, websection.getId()),
basic='ERP5TypeTestCase:',
request_method='POST',
extra={
stdin=StringIO(urlencode({
'form_id': 'WebSection_view',
'form_action': 'Base_edit',
'edit_document_url': '%s/%s/%s/WebSection_view' % \
(website.absolute_url(), language,
websection.getId()),
'field_my_title': '%s_edited' % websection.getId(),
}
}))
)
self.assertEqual(MOVED_TEMPORARILY, response.getStatus())
......@@ -1315,14 +1317,14 @@ Hé Hé Hé!""", page.asText().strip())
language),
basic='ERP5TypeTestCase:',
request_method='POST',
extra={
stdin=StringIO(urlencode({
'form_id': 'WebSite_view',
'form_action': 'Base_edit',
'edit_document_url': '%s/%s/WebSite_view' % \
(website.absolute_url(), language),
'field_my_title': '%s_edited' % website.getId(),
'field_my_id': language,
}
}))
)
self.assertEqual(MOVED_TEMPORARILY, response.getStatus())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment