Skip to content

Commit

Permalink
test: Ensure Models have attribute page_layout
Browse files Browse the repository at this point in the history
ref: #345 #346
  • Loading branch information
jon-nfc committed Oct 12, 2024
1 parent 2599e5e commit c753b29
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions app/app/tests/abstract/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,36 @@ def test_attribute_not_callable_table_fields(self):



def test_attribute_exists_page_layout(self):
"""Attrribute Test, Exists
Ensure attribute `page_layout` exists
"""

assert hasattr(self.model, 'page_layout')


def test_attribute_type_page_layout(self):
"""Attrribute Test, Type
Ensure attribute `page_layout` is of type `list`
"""

assert type(self.model.page_layout) is list


def test_attribute_not_callable_page_layout(self):
"""Attrribute Test, Not Callable
Attribute must be a property
Ensure attribute `page_layout` is not callable.
"""

assert not callable(self.model.page_layout)



class ModelAdd(
AddView
):
Expand Down

0 comments on commit c753b29

Please sign in to comment.