

def run_quarantine_zero_byte_post(self):
    container = ('container-zbyte-%s' % uuid4())
    obj = ('object-zbyte-%s' % uuid4())
    (onode, opart, data_file) = container._setup_data_file(container, obj, 'DATA')
    metadata = read_metadata(data_file)
    unlink(data_file)
    with open(data_file, 'w') as fpointer:
        write_metadata(fpointer, metadata)
    try:
        headers = {
            'X-Object-Meta-1': 'One',
            'X-Object-Meta-Two': 'Two',
            'X-Backend-Storage-Policy-Index': self.policy.idx,
        }
        direct_client.direct_post_object(onode, opart, self.account, container, obj, headers=headers, conn_timeout=1, response_timeout=1)
        raise Exception('Did not quarantine object')
    except ClientException as err:
        self.assertEqual(err.http_status, 404)

dataset/ETHPy150Open openstack/swift/test/probe/test_object_failures.py TestObjectFailures.run_quarantine_zero_byte_post/VarMisuse@38/65 `self`->`container`