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

[fix] Assigned a callable to model choices attribute to deal with the latest NOTIFICATION_CHOICES #269

Closed

Conversation

mohamedAbdelaleem
Copy link

After running the tests locally I encountered some errors. One caused by a typo here. Additionally, certain test cases are updating the NOTIFICATION_CHOICES, but these updates are not reflected in the choices attribute of the affected models.

full_clean_error

… latest NOTIFICATION_CHOICES

Created get_notification_choices() to dynamically update the choices
attribute of models with the latest NOTIFICATION_CHOICES. this fixes
issues in tests where the updates that applied on NOTIFICATION_CHOICES don't
reflect on the choices attributes in the models.
Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

Sorry was super busy, will look into this asap

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

@mohamedAbdelaleem these changes do not seem very critical to me, we didn't have any test failure before.

What Django and Python versions are you using?

The build is faling for QA checks, please review and read instructions in the build output on how to fix those.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

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

After running the tests locally I encountered some errors. One caused by a typo here. Additionally, certain test cases are updating the NOTIFICATION_CHOICES, but these updates are not reflected in the choices attribute of the affected models.

full_clean_error

Can you please explain the steps you're following to replicate this test failure please? And point out what tests you are referring to?

@mohamedAbdelaleem
Copy link
Author

What Django and Python versions are you using?

I am using Python 3.12 and that is the reason. After downgrading to Python 3.9, I don't have any test failures.
Sorry about that, I should close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants