def test_as_dict(self, title, subtitle, image_url, buttons): card_obj = Card(title=title, subtitle=subtitle, image_url=image_url, buttons=buttons) assert card_obj._as_dict() == { 'card': { 'title': title, 'subtitle': subtitle, 'imageUri': image_url, 'buttons': buttons } }
def test_button_empty_params(self): card_obj = Card(buttons=[{}]) assert card_obj._as_dict() == {'card': {'buttons': [{}]}}
def test_empty_params(self): card_obj = Card() assert card_obj._as_dict() == {'card': {}}