Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Provide tests for hashing ofOperandHolder#9437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
auvipy merged 1 commit intoencode:masterfromvanya909:master
Jun 15, 2024

Conversation

vanya909
Copy link
Contributor

Description

Provide tests for#9417 according tocomment

OttoAndrey reacted with rocket emoji
@auvipyauvipy requested a review froma teamJune 15, 2024 07:58
Copy link
Member

@auvipyauvipy left a comment

Choose a reason for hiding this comment

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

thanks for the followup contribution!

vanya909 reacted with thumbs up emoji
@auvipyauvipy merged commit1e9b5c1 intoencode:masterJun 15, 2024
7 checks passed
@@ -716,3 +716,59 @@ def has_object_permission(self, request, view, obj):
composed_perm = (IsAuthenticatedUserOwner | permissions.IsAdminUser)
hasperm = composed_perm().has_object_permission(request, None, None)
assert hasperm is False

def test_operand_holder_is_hashable(self):
assert hash((permissions.IsAuthenticated & permissions.IsAdminUser))
Copy link
Contributor

Choose a reason for hiding this comment

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

May fail ifhash returns zero. The proper check would be that no exception is thrown. (E.g., via>= 0)

vanya909 reacted with thumbs up emoji
Comment on lines +769 to +772
filtered_permissions = [
perm for perm
in dict.fromkeys(unfiltered_permissions)
]
Copy link
Contributor

Choose a reason for hiding this comment

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

filtered_permissions = list(dict.fromkeys(unfiltered_permissions))

vanya909 reacted with thumbs up emoji
@vanya909
Copy link
ContributorAuthor

@peterthomassen Should I open PR for these fixes?

@peterthomassen
Copy link
Contributor

I don't think so; just trying to enable the community to learn from each other! :-) Thanks for the tests, I like how they are set up.

vanya909 reacted with thumbs up emoji

@browniebrokebrowniebroke added this to the3.16 milestoneJan 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@peterthomassenpeterthomassenpeterthomassen left review comments

@auvipyauvipyauvipy approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
3.16
Development

Successfully merging this pull request may close these issues.

4 participants
@vanya909@peterthomassen@auvipy@browniebroke

[8]ページ先頭

©2009-2025 Movatter.jp