Skip to content

Commit

Permalink
[qacode] added main methods to messageType enum
Browse files Browse the repository at this point in the history
  • Loading branch information
crypto netzulo committed Dec 10, 2017
1 parent d2b2d39 commit 5dab9be
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qacode/core/webs/controls/control_form.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,13 @@ class MessageType(Enum):
BEHAVIOUR = 'BEHAVIOUR'
USABILITY = 'USABILITY'
SEO = 'SEO'

@classmethod
def get_attr(cls):
"""return enum values"""
return [item.value for item in MessageType]

@classmethod
def has_attr(cls, value):
"""returns True if enum have value"""
return any(value == item.value for item in cls)

0 comments on commit 5dab9be

Please sign in to comment.