Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] base_user_role: Improve test validation sorting values #309

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

victoralmau
Copy link
Member

Improve test validation sorting values

Related to #304

Please @pedrobaeza and @sebalix can you review it?

@Tecnativa

@OCA-git-bot
Copy link
Contributor

Hi @novawish, @sebalix, @jcdrubay,
some modules you are maintaining are being modified, check this out!

@pedrobaeza pedrobaeza added this to the 16.0 milestone Sep 5, 2024
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

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

I think there's no need to sort. Sets already compare equality without taking order into account.

@victoralmau
Copy link
Member Author

I have proposed this change because it solves this error (installing several core modules). Sorted is something that is already being used in other base_user_role tests.

FAIL: TestUserRole.test_group_groups_into_role
Traceback (most recent call last):
  File "/opt/odoo/auto/addons/base_user_role/tests/test_user_role.py", line 272, in test_group_groups_into_role
    self.assertEqual(new_role.implied_ids.ids, user_group_ids)
AssertionError: Lists differ: [12, 8, 80, 77, 28, 82, 32, 35, 17, 19, 63, 53, 3[121 chars], 78] != [12, 8, 38, 82, 80, 32, 77, 17, 19, 63, 28, 53, 3[121 chars], 78]
First differing element 2:
80
38

@pedrobaeza
Copy link
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-309-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 65f0dce into OCA:16.0 Sep 6, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at d05e04b. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 16.0-fix-base_user_role-tests branch September 6, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants