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

refactor views to auto-generate permission_required #143

Closed
2 tasks
Tracked by #307
jon-nfc opened this issue Jul 20, 2024 · 4 comments
Closed
2 tasks
Tracked by #307

refactor views to auto-generate permission_required #143

jon-nfc opened this issue Jul 20, 2024 · 4 comments
Labels
Migrated from Gitlab This issue/PR was migrated from GitLab see #213 type::quality assurance Type for Issues and Merge Requests. Can also be used in discussion in comments and commits

Comments

@jon-nfc
Copy link
Member

jon-nfc commented Jul 20, 2024

ref app.test.abstract.views.AllViews

Reason: Reduce what is required to create a view. !43

    @pytest.mark.skip(reason='write test')
    def test_view_index_attribute_missing_permission_required(self):
        """ Attribute missing Test
        
        Ensure that `permission_required` attribute is not defined within the view.

        this can be done by mocking the inherited class with the `permission_required` attribute
        set to a value that if it changed would be considered defined in the created view.

        ## Why?

        This attribute can be dynamically added based of of the view name along with attributes
        `model._meta.model_name` and `str(__class__.__name__).lower()`. 

        Additional test:
        - ensure that the attribute does get automagically created.
        - ensure that the classes name is one of add, change, delete, display or index.
        """

Requirements

  • Remove permission_required attribute from all views
  • ensure class names for views are correctly set.
@jon-nfc
Copy link
Member Author

jon-nfc commented Jul 20, 2024

marked this issue as related to #15

@jon-nfc
Copy link
Member Author

jon-nfc commented Jul 20, 2024

marked this issue as related to #74

@jon-nfc
Copy link
Member Author

jon-nfc commented Jul 20, 2024

added 5m of time spent

@jon-nfc jon-nfc added Migrated from Gitlab This issue/PR was migrated from GitLab see #213 and removed module::base labels Aug 8, 2024
@jon-nfc jon-nfc mentioned this issue Aug 8, 2024
12 tasks
@jon-nfc jon-nfc mentioned this issue Sep 19, 2024
35 tasks
@jon-nfc
Copy link
Member Author

jon-nfc commented Sep 27, 2024

This issue is no longer relevant see #307.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Migrated from Gitlab This issue/PR was migrated from GitLab see #213 type::quality assurance Type for Issues and Merge Requests. Can also be used in discussion in comments and commits
Projects
Archived in project
Development

No branches or pull requests

1 participant