ceph / ceph/s3-tests

test_object_create_bad_contentlength_negative expects error_code to be None?

Open
#6 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
372
Forks
328
PR merge metrics
No merged PRs in 30d

Description

Is it correct for the test_object_create_bad_contentlength_negative (and a few others) to expect no error_code when sending an invalid ContentLength? Perhaps the error_code should be ignored or something like 'InvalidURI' instead?

```
def test_object_create_bad_contentlength_negative():
key = _setup_bad_object({'Content-Length': -1})

e = assert_raises(boto.exception.S3ResponseError, key.set_contents_from_string, 'bar')
eq(e.status, 400)
eq(e.reason, 'Bad Request')
eq(e.error_code, None)
^^^^^^^^^^^^^^^^^^^^^^
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.