Minor changes in wsf test cases.
This commit is contained in:
@@ -110,9 +110,9 @@ feature {NONE} -- Events
|
|||||||
create h.make
|
create h.make
|
||||||
b := base_url
|
b := base_url
|
||||||
if b = Void then
|
if b = Void then
|
||||||
b := ""
|
b := "/"
|
||||||
end
|
end
|
||||||
if attached {HTTP_CLIENT_SESSION} h.new_session ("localhost:" + port_number.out + "/" + b) as sess then
|
if attached {HTTP_CLIENT_SESSION} h.new_session ("localhost:" + port_number.out + b) as sess then
|
||||||
http_session := sess
|
http_session := sess
|
||||||
sess.set_timeout (-1)
|
sess.set_timeout (-1)
|
||||||
sess.set_is_debug (True)
|
sess.set_is_debug (True)
|
||||||
@@ -125,10 +125,16 @@ feature {NONE} -- Events
|
|||||||
do
|
do
|
||||||
get_http_session
|
get_http_session
|
||||||
if attached http_session as sess then
|
if attached http_session as sess then
|
||||||
if attached sess.get (a_url, adapted_context (ctx)) as res and then not res.error_occurred and then attached res.body as l_body then
|
if attached sess.get (a_url, adapted_context (ctx)) as res then
|
||||||
assert ("Good answer got=%""+l_body+"%" expected=%""+a_expected_body+"%"", l_body.same_string (a_expected_body))
|
if attached res.body as l_body then
|
||||||
else
|
if res.error_occurred then
|
||||||
assert ("Request %""+a_url+"%" failed", False)
|
assert ("Request %""+a_url+"%" failed, got=[" + l_body + "]", False)
|
||||||
|
else
|
||||||
|
assert ("Good answer got=%""+l_body+"%" expected=%""+a_expected_body+"%"", l_body.same_string (a_expected_body))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
assert ("Request %""+a_url+"%" failed, no body, status=" + res.status.out , False)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Content-Disposition: form-data; name="password"
|
|||||||
EWFpassword
|
EWFpassword
|
||||||
--__=_the_boundary_1332296477_1804289383_=__--
|
--__=_the_boundary_1332296477_1804289383_=__--
|
||||||
]"
|
]"
|
||||||
|
b.replace_substring_all ("%N", "%R%N")
|
||||||
h.put_content_length (b.count)
|
h.put_content_length (b.count)
|
||||||
|
|
||||||
--| Case #1
|
--| Case #1
|
||||||
|
|||||||
Reference in New Issue
Block a user