# HG changeset patch
# User Guolian Yun <yunguol(a)cn.ibm.com>
# Date 1209086856 25200
# Node ID 37950e39b4173f3c3daa2c936de1a63708abd09d
# Parent 0b8c0247e9b8f8e7c26f25795a580284218c56e8
[TEST]Fix indication_tester to send proper Content-Type based on Kaitlin's patch
Signed-off-by: Guolian Yun <yunguol(a)cn.ibm.com>
diff -r 0b8c0247e9b8 -r 37950e39b417
suites/libvirt-cim/lib/XenKvmLib/indication_tester.py
--- a/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py Wed Apr 23 19:56:59 2008
+0530
+++ b/suites/libvirt-cim/lib/XenKvmLib/indication_tester.py Thu Apr 24 18:27:36 2008
-0700
@@ -317,7 +317,7 @@ class CIMIndicationSubscription:
headers = {"CIMOperation" : "MethodCall",
"CIMMethod" : method,
"CIMObject" : "root/PG_Interop",
- "Content-Type" : "text/cimxml"}
+ "Content-Type" : 'application/xml;
charset="utf-8"'}
if auth_hdr:
headers["Authorization"] = "Basic %s" % auth_hdr
@@ -325,7 +325,8 @@ class CIMIndicationSubscription:
conn.request("POST", "/cimom", body, headers)
resp = conn.getresponse()
if not resp.getheader("content-length"):
- raise Exception("Authentication (or request) Failed!")
+ raise Exception("Request Failed: %d %s" %
+ (resp.status, resp.reason))
resp.read()