Make TestSwiftBasicOps use object_client

TestSwiftBasicOps uses a raw http client without object_client
which has enough functions for testing. The raw http client will
be moved to tempest-lib with a rest client together. In addition,
all scenario tests should not use the raw http client because they
are integrated tests.
This patch makes TestSwiftBasicOps use object_client.

In addtion, this patch adds default headers to raw_request() because
raw_request() couldn't handle the case and TypeError happened if not
passing headers to raw_request().

Change-Id: I4aee464d1f1ef67ba6db6c37b5bb6c5e5607a162
diff --git a/tempest/common/rest_client.py b/tempest/common/rest_client.py
index 8fac6c3..293077b 100644
--- a/tempest/common/rest_client.py
+++ b/tempest/common/rest_client.py
@@ -386,6 +386,8 @@
         return resp, resp_body
 
     def raw_request(self, url, method, headers=None, body=None):
+        if headers is None:
+            headers = self.get_headers()
         return self.http_obj.request(url, method,
                                      headers=headers, body=body)
 
diff --git a/tempest/scenario/test_swift_basic_ops.py b/tempest/scenario/test_swift_basic_ops.py
index 312fbc6..660b586 100644
--- a/tempest/scenario/test_swift_basic_ops.py
+++ b/tempest/scenario/test_swift_basic_ops.py
@@ -13,7 +13,6 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from tempest.common import http
 from tempest import config
 from tempest.openstack.common import log as logging
 from tempest.scenario import manager
@@ -65,12 +64,9 @@
         obj_name, _ = self.upload_object_to_container(container_name)
         obj_url = '%s/%s/%s' % (self.object_client.base_url,
                                 container_name, obj_name)
-        dscv = CONF.identity.disable_ssl_certificate_validation
-        ca_certs = CONF.identity.ca_certificates_file
-        http_client = http.ClosingHttp(
-            disable_ssl_certificate_validation=dscv, ca_certs=ca_certs)
-        resp, _ = http_client.request(obj_url, 'GET')
+        resp, _ = self.object_client.raw_request(obj_url, 'GET')
         self.assertEqual(resp.status, 401)
+
         self.change_container_acl(container_name, '.r:*')
-        resp, _ = http_client.request(obj_url, 'GET')
+        resp, _ = self.object_client.raw_request(obj_url, 'GET')
         self.assertEqual(resp.status, 200)