def good(self, message: str, title: str = None,
          title_link: str = None) -> None:
     """Preformated ok message."""
     self._send(attachments(
             attachment(fallback='Good: {}'.format(message),
                        text=message, title=title, title_link=title_link,
                        color='good')
     ))
 def critical(self, message: str, title: str = None,
              title_link: str = None) -> None:
     """Preformated critical message."""
     self._send(attachments(
             attachment(fallback='Critical: {}'.format(message),
                        text=message, title=title, title_link=title_link,
                        color='danger')
     ))
 def info(self, message: str, title: str = None,
          title_link: str = None) -> None:
     """Preformated warning message."""
     self._send(attachments(
             attachment(fallback='Info: {}'.format(message),
                        text=message, title=title, title_link=title_link,
                        color='#CCE5FF')
     ))
 def custom(self, *args) -> None:
     """Custom message with elements."""
     self._send(attachments(*args))
def test_element_attachments():
    assert elements.attachments(DICTIONARY, DICTIONARY) == {
        'attachments': [DICTIONARY, DICTIONARY]
    }