Skip to content

test_object_create_bad_contentlength_negative expects error_code to be None? #6

@wyllys66

Description

@wyllys66

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)
    ^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions