]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
NetApp unit test fail fix for http_proxy
authorNavneet Singh <singn@netapp.com>
Mon, 21 Oct 2013 20:11:11 +0000 (01:41 +0530)
committerNavneet Singh <singn@netapp.com>
Mon, 21 Oct 2013 20:51:19 +0000 (02:21 +0530)
The environment having http_proxy settings caused
the unit tests to fail with 404 error. This fix
handles both situations with proxy or without
proxy settings.

Change-Id: I791a45adff654305db9f1fb6f039e91b11ba88d8
Closes-Bug:#1223145

cinder/tests/test_netapp.py
cinder/tests/test_netapp_ssc.py

index bba3a197fe9f420eb037164dd5bf72ca55a11d6f..fe3bb55127d8476e53d8ee864a0986512f32e49e 100644 (file)
@@ -97,7 +97,7 @@ class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler):
 
     def do_GET(s):
         """Respond to a GET request."""
-        if '/servlets/netapp.servlets.admin.XMLrequest_filer' != s.path:
+        if '/servlets/netapp.servlets.admin.XMLrequest_filer' not in s.path:
             s.send_response(404)
             s.end_headers
             return
@@ -111,7 +111,7 @@ class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler):
 
     def do_POST(s):
         """Respond to a POST request."""
-        if '/servlets/netapp.servlets.admin.XMLrequest_filer' != s.path:
+        if '/servlets/netapp.servlets.admin.XMLrequest_filer' not in s.path:
             s.send_response(404)
             s.end_headers
             return
@@ -683,7 +683,7 @@ class FakeDirect7MODEServerHandler(FakeHTTPRequestHandler):
 
     def do_GET(s):
         """Respond to a GET request."""
-        if '/servlets/netapp.servlets.admin.XMLrequest_filer' != s.path:
+        if '/servlets/netapp.servlets.admin.XMLrequest_filer' not in s.path:
             s.send_response(404)
             s.end_headers
             return
@@ -697,7 +697,7 @@ class FakeDirect7MODEServerHandler(FakeHTTPRequestHandler):
 
     def do_POST(s):
         """Respond to a POST request."""
-        if '/servlets/netapp.servlets.admin.XMLrequest_filer' != s.path:
+        if '/servlets/netapp.servlets.admin.XMLrequest_filer' not in s.path:
             s.send_response(404)
             s.end_headers
             return
index 4c10cac3821adf9d505c324caab3e9810819979a..9d5f0b8536dc541752ff837d90cbaa9c263697dd 100644 (file)
@@ -75,7 +75,7 @@ class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler):
 
     def do_GET(s):
         """Respond to a GET request."""
-        if '/servlets/netapp.servlets.admin.XMLrequest_filer' != s.path:
+        if '/servlets/netapp.servlets.admin.XMLrequest_filer' not in s.path:
             s.send_response(404)
             s.end_headers
             return
@@ -89,7 +89,7 @@ class FakeDirectCMODEServerHandler(FakeHTTPRequestHandler):
 
     def do_POST(s):
         """Respond to a POST request."""
-        if '/servlets/netapp.servlets.admin.XMLrequest_filer' != s.path:
+        if '/servlets/netapp.servlets.admin.XMLrequest_filer' not in s.path:
             s.send_response(404)
             s.end_headers
             return