<s> """<STR_LIT>""" <EOL> import calendar <EOL> import time <EOL> import zlib <EOL> from hashlib import md5 <EOL> from cafe . drivers . unittest . decorators import ( <EOL> DataDrivenFixture , data_driven_test ) <EOL> from cloudcafe . objectstorage . objectstorage_api . common . constants import Constants <EOL> from cloudroast . objectstorage . fixtures import ObjectStorageFixture <EOL> from cloudroast . objectstorage . generators import ( <EOL> ObjectDatasetList , CONTENT_TYPES ) <EOL> CONTAINER_DESCRIPTOR = '<STR_LIT>' <EOL> STATUS_CODE_MSG = ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> @ DataDrivenFixture <EOL> class ObjectSmokeTest ( ObjectStorageFixture ) : <EOL> @ classmethod <EOL> def setUpClass ( cls ) : <EOL> super ( ObjectSmokeTest , cls ) . setUpClass ( ) <EOL> cls . default_obj_name = Constants . VALID_OBJECT_NAME <EOL> @ staticmethod <EOL> def generate_chunk_data ( ) : <EOL> for i in range ( <NUM_LIT:10> ) : <EOL> yield "<STR_LIT>" % i <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_retrieval_with_valid_object_name ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> response = self . client . get_object ( container_name , object_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( exclude = [ '<STR_LIT>' , '<STR_LIT>' ] ) ) <EOL> def ddtest_object_retrieval_with_if_match ( <EOL> self , object_type , generate_object ) : <EOL> """<STR_LIT>""" <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> obj_info = generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : obj_info . get ( '<STR_LIT>' ) } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( exclude = [ '<STR_LIT>' , '<STR_LIT>' ] ) ) <EOL> def ddtest_object_retrieval_with_if_none_match ( <EOL> self , object_type , generate_object ) : <EOL> """<STR_LIT>""" <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_info = generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> headers = { '<STR_LIT>' : object_info . get ( '<STR_LIT>' ) } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_retrieval_with_if_modified_since ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_not_modified_with_if_modified_since ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_retrieval_with_if_unmodified_since ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_retrieval_fails_with_if_unmodified_since ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_partial_object_retrieval_with_start_range ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , expected = expected , received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_partial_object_retrieval_with_end_range ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_partial_object_retrieval_with_range ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_partial_object_retrieval_with_complete_range ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_creation_with_valid_object_name ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_info = generate_object ( container_name , object_name ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response_md5 = md5 ( response . content ) . hexdigest ( ) <EOL> self . assertEqual ( <EOL> object_info . get ( '<STR_LIT>' ) , <EOL> response_md5 , <EOL> msg = '<STR_LIT>' ) <EOL> @ data_driven_test ( ObjectDatasetList ( exclude = [ '<STR_LIT>' , '<STR_LIT>' ] ) ) <EOL> def ddtest_object_update_with_valid_object_name ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> updated_object_data = '<STR_LIT>' <EOL> updated_content_length = str ( len ( updated_object_data ) ) <EOL> headers = { '<STR_LIT>' : updated_content_length , <EOL> '<STR_LIT:Content-Type>' : CONTENT_TYPES . get ( '<STR_LIT:text>' ) } <EOL> response = self . client . create_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers , <EOL> data = updated_object_data ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_creation_with_etag ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_info = generate_object ( container_name , object_name ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> if object_type == '<STR_LIT>' : <EOL> expected = object_info . get ( '<STR_LIT>' ) <EOL> else : <EOL> expected = '<STR_LIT>' . format ( object_info . get ( '<STR_LIT>' ) ) <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( exclude = [ '<STR_LIT>' , '<STR_LIT>' ] ) ) <EOL> def test_object_creation_with_uppercase_etag ( self ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_data = "<STR_LIT>" <EOL> data_md5 = md5 ( object_data ) . hexdigest ( ) <EOL> upper_etag = data_md5 . upper ( ) <EOL> headers = { "<STR_LIT>" : upper_etag } <EOL> create_response = self . client . create_object ( container_name , <EOL> object_name , <EOL> data = object_data , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = create_response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> object_response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> object_response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = data_md5 <EOL> received = object_response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_control_allow_credentials ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT:true>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT:true>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_control_allow_methods ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_control_allow_origin ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_control_expose_headers ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_controle_max_age ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT:5>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT:5>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_control_request_headers ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_creation_with_access_control_request_method ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT:GET>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT:GET>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( <EOL> expected , <EOL> received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_object_retrieval_with_origin ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> generate_object ( container_name , object_name , headers = headers ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . get_object_metadata ( <EOL> container_name , object_name , headers = headers ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( exclude = [ '<STR_LIT>' , '<STR_LIT>' ] ) ) <EOL> def ddtest_object_creation_with_file_compression ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> def object_data_op ( data , extra_data ) : <EOL> data = zlib . compress ( data ) <EOL> return ( data , extra_data ) <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> data_op = object_data_op , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_creation_with_content_disposition ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_creation_with_x_delete_at ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> start_time = calendar . timegm ( time . gmtime ( ) ) <EOL> future_time = str ( int ( start_time + <NUM_LIT> ) ) <EOL> object_headers = { '<STR_LIT>' : future_time } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = future_time <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_creation_with_delete_after ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> object_headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> object_info = generate_object ( container_name , object_name , <EOL> headers = object_headers ) <EOL> response = object_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> @ ObjectStorageFixture . required_features ( '<STR_LIT>' ) <EOL> def ddtest_versioned_container_creation_with_valid_data ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_history_container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> headers = { '<STR_LIT>' : object_history_container_name } <EOL> self . client . set_container_metadata ( container_name , headers = headers ) <EOL> response = self . client . list_objects ( <EOL> object_history_container_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> object_name = self . default_obj_name <EOL> ver1_info = generate_object ( container_name , object_name ) <EOL> response = ver1_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> object_name = self . default_obj_name <EOL> ver2_info = generate_object ( container_name , object_name ) <EOL> response = ver2_info . get ( '<STR_LIT>' ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . list_objects ( object_history_container_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_put_copy_object ( self , object_type , generate_object ) : <EOL> src_container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> dest_container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> src_object_name = '<STR_LIT>' . format ( self . default_obj_name ) <EOL> generate_object ( src_container_name , src_object_name ) <EOL> dest_obj_name = '<STR_LIT>' . format ( self . default_obj_name ) <EOL> source = '<STR_LIT>' . format ( src_container_name , src_object_name ) <EOL> hdrs = { '<STR_LIT>' : source , '<STR_LIT>' : '<STR_LIT:0>' } <EOL> response = self . client . copy_object ( <EOL> dest_container_name , <EOL> dest_obj_name , <EOL> headers = hdrs ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object ( <EOL> dest_container_name , <EOL> dest_obj_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_copy_object ( self , object_type , generate_object ) : <EOL> src_container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> dest_container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> src_object_name = '<STR_LIT>' . format ( self . default_obj_name ) <EOL> generate_object ( src_container_name , src_object_name ) <EOL> dest_object_name = '<STR_LIT>' . format ( self . default_obj_name ) <EOL> dest = '<STR_LIT>' . format ( dest_container_name , dest_object_name ) <EOL> headers = { '<STR_LIT>' : dest } <EOL> response = self . client . copy_object ( <EOL> src_container_name , <EOL> src_object_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object ( <EOL> dest_container_name , <EOL> dest_object_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_object_deletion_with_valid_object ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> response = self . client . delete_object ( <EOL> container_name , <EOL> object_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_obj_metadata_update_with_object_possessing_metadata ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name , <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , object_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . set_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_obj_metadata_update ( self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object_name = self . default_obj_name <EOL> generate_object ( container_name , object_name ) <EOL> headers = { '<STR_LIT>' : '<STR_LIT>' } <EOL> response = self . client . set_object_metadata ( <EOL> container_name , object_name , headers = headers ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> response = self . client . get_object_metadata ( <EOL> container_name , <EOL> self . default_obj_name ) <EOL> self . assertIn ( <EOL> '<STR_LIT>' , <EOL> response . headers , <EOL> msg = "<STR_LIT>" ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_content_type_not_detected_without_detect_content_type_header ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object1_name = '<STR_LIT>' <EOL> object1_headers = { '<STR_LIT:Content-Type>' : '<STR_LIT>' } <EOL> generate_object ( container_name , object1_name , headers = object1_headers ) <EOL> object2_name = '<STR_LIT>' <EOL> object2_headers = { '<STR_LIT>' : False , <EOL> '<STR_LIT:Content-Type>' : '<STR_LIT>' } <EOL> generate_object ( container_name , object2_name , headers = object2_headers ) <EOL> response = self . client . get_object ( <EOL> container_name , object1_name ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> response = self . client . get_object ( <EOL> container_name , object2_name ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> @ data_driven_test ( ObjectDatasetList ( ) ) <EOL> def ddtest_content_type_detected_with_detect_content_type ( <EOL> self , object_type , generate_object ) : <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> object1_name = '<STR_LIT>' <EOL> object1_headers = { '<STR_LIT>' : True , <EOL> '<STR_LIT:Content-Type>' : '<STR_LIT>' } <EOL> generate_object ( container_name , object1_name , headers = object1_headers ) <EOL> response = self . client . get_object ( <EOL> container_name , object1_name ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> object2_name = '<STR_LIT>' <EOL> object2_headers = { '<STR_LIT>' : True } <EOL> generate_object ( container_name , object2_name , headers = object2_headers ) <EOL> response = self . client . get_object ( <EOL> container_name , object2_name ) <EOL> expected = '<STR_LIT>' <EOL> received = response . headers . get ( '<STR_LIT>' ) <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = '<STR_LIT>' <EOL> '<STR_LIT>' . format ( expected , received ) ) <EOL> def test_object_creation_via_chunked_transfer ( self ) : <EOL> """<STR_LIT>""" <EOL> container_name = self . create_temp_container ( <EOL> descriptor = CONTAINER_DESCRIPTOR ) <EOL> headers = { "<STR_LIT>" : "<STR_LIT>" } <EOL> create_response = self . client . create_object ( <EOL> container_name , <EOL> self . default_obj_name , <EOL> headers = headers , <EOL> data = self . generate_chunk_data ( ) ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT> <EOL> received = create_response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) <EOL> object_response = self . client . get_object ( container_name , <EOL> self . default_obj_name ) <EOL> method = '<STR_LIT>' <EOL> expected = <NUM_LIT:200> <EOL> received = object_response . status_code <EOL> self . assertEqual ( <EOL> expected , <EOL> received , <EOL> msg = STATUS_CODE_MSG . format ( <EOL> method = method , <EOL> expected = expected , <EOL> received = str ( received ) ) ) </s>
