Ejemplo n.º 1
0
 def _foo_bar_container_foo_bar_object_NO_BUFFER(self, method, url, body, headers):
     # test_download_object_data_is_not_buffered_in_memory
     body = generate_random_data(1000)
     return (httplib.OK,
             body,
             headers,
             httplib.responses[httplib.OK])
Ejemplo n.º 2
0
 def _foo_bar_container_foo_bar_object(self, method, url, body, headers):
     # test_download_object_success
     body = generate_random_data(1000)
     return (httplib.OK,
             body,
             headers,
             httplib.responses[httplib.OK])
Ejemplo n.º 3
0
 def _v1_MossoCloudFS_foo_bar_container_foo_bar_object_INVALID_SIZE(
         self, method, url, body, headers):
     # test_download_object_invalid_file_size
     body = generate_random_data(100)
     return (httplib.OK, body,
             self.base_headers,
             httplib.responses[httplib.OK])
Ejemplo n.º 4
0
    def _v1_MossoCloudFS_foo_bar_container_foo_bar_object(
            self, method, url, body, headers):

        if method == 'DELETE':
            # test_delete_object_success
            body = self.fixtures.load('list_container_objects_empty.json')
            headers = self.base_headers
            status_code = httplib.NO_CONTENT
            return (status_code, body, headers, httplib.responses[httplib.OK])
        elif method == 'GET':
            body = generate_random_data(1000)
            return (httplib.OK,
                    body,
                    self.base_headers,
                    httplib.responses[httplib.OK])
Ejemplo n.º 5
0
    def _foo_bar_container_foo_bar_object(self, method, url, body, headers):
        # test_upload_object_invalid_file_size
        self._assert_content_length_header_is_string(headers=headers)

        body = generate_random_data(1000)
        return (httplib.OK, body, headers, httplib.responses[httplib.OK])
Ejemplo n.º 6
0
 def _rest_namespace_foo_20_26_20bar_container_foo_20_26_20bar_object(
         self, method, url, body, headers):
     body = generate_random_data(1000)
     return (httplib.OK, body, {}, httplib.responses[httplib.OK])