Exemplo n.º 1
0
 def test_card_items_list(self):
     card_items_list = types.Card(types.CardType.ITEMS_LIST,
                                  header=CARD_HEADER_TEXT,
                                  items=[types.Image(**IMAGE)],
                                  footer=dict(text=FOOTER_TEXT,
                                              button=MEDIA_BUTTON))
     self._assert_payload(card_items_list, EXPECTED_CARD_ITEMS_LIST_JSON)
Exemplo n.º 2
0
 def test_card_big_image(self):
     card_big_image = types.Card(
         types.CardType.BIG_IMAGE,
         image_id=IMAGE_ID,
         title=CARD_TITLE,
         description=CARD_DESCR,
         button=types.MediaButton(BUTTON_TEXT, URL, MB_PAYLOAD),
     )
     self._assert_payload(card_big_image, EXPECTED_CARD_BIG_IMAGE_JSON)