nofusscomputing / centurion_erp

An ERP with a focus on ITSM and Automation
MIT License
0 stars 0 forks source link

refactor views to auto-generate permission_required #143

Closed jon-nfc closed 1 month ago

jon-nfc commented 3 months ago

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

jon-nfc commented 3 months ago

marked this issue as related to #15

jon-nfc commented 3 months ago

marked this issue as related to #74

jon-nfc commented 3 months ago

added 5m of time spent

jon-nfc commented 1 month ago

This issue is no longer relevant see #307.