Skip to content
This repository was archived by the owner on Oct 12, 2026. It is now read-only.
This repository was archived by the owner on Oct 12, 2026. It is now read-only.

test_object_create_bad_contentlength_negative expects error_code to be None? #6

Open

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

Activity

  1. yehudasa commented on Jun 3, 2013

    @yehudasa
    Member

    Yeah, we can probably remove this line.

  2. wyllys66 commented on Jun 3, 2013

    @wyllys66
    ContributorAuthor

    Would you like me to submit a pull request with the fix(es) ?

  3. yehudasa commented on Jun 3, 2013

    @yehudasa
    Member

    Sure, thanks

  4. added a commit that references this issue on Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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