Skip to content

Conversation

@jonashaag
Copy link

I'd like to make sure that HEAD requests respond with 40x iff the corresponding GET requests respond with 40x.

I didn't find any tests for the actual package URLs. I'd like to add tests for those URLs as well.

# fail on private channel without credentials
response = client.get('/get/privatechannel/noarch/current_repodata.json')
assert response.status_code == 401
for method in [client.get, client.head]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonashaag, what would speak against adding a method callable as a parametrization instead of adding an iteration on each assertion?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my first approach. The problem is that you need this in very few places only

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I see it. 🙈

@wolfv wolfv added the enhancement New feature or request label Nov 22, 2023
@wolfv
Copy link
Member

wolfv commented Nov 22, 2023

Looks good to me, but I assume we're waiting for some more tests @jonashaag ?

@jonashaag
Copy link
Author

Are there any tests for package downloads? I haven't found them. I'd like to add the same there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants