Skip to content

contrast-sdk-python tests incorrectly pass when given bad login data #12

@pardeema-contrast

Description

@pardeema-contrast

Because the tests appear to be checking for a 200 response code from the server, they will pass even if data is bad in test-config.json

I think this is because the Python requests library automatically does redirects and a bad Contrast request redirects back to login.

For example, I set a bogus username, api_key, and server_key and all tests in the test suite pass, but never will actually return any meaningful data.

Issue could be resolved by setting all Python requests calls use allow_redirects=False

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