def test_amazon_unicode(self): self.assertEqual( ua.notification(amazon=ua.amazon( alert=u'Amazon test', expires_after=u'100', )), {'amazon': { 'alert': 'Amazon test', 'expires_after': '100', }})
def test_amazon(self): self.assertEqual( ua.notification( amazon=ua.amazon(alert='Amazon test', title='My Title', consolidation_key='123456', expires_after=100, summary='Summary of message', extra={'more': 'stuff'}, interactive={ 'type': 'a_type', 'button_actions': { 'yes': { 'add_tag': 'clicked_yes' }, 'no': { 'add_tag': 'clicked_no' } } }, style={ 'type': 'big_picture', 'big_picture': 'bigpic.png', 'title': 'A title', 'summary': 'A summary' }, sound='cowbell.mp3')), { 'amazon': { 'alert': 'Amazon test', 'title': 'My Title', 'consolidation_key': '123456', 'expires_after': 100, 'summary': 'Summary of message', 'extra': { 'more': 'stuff', }, 'interactive': { 'type': 'a_type', 'button_actions': { 'yes': { 'add_tag': 'clicked_yes' }, 'no': { 'add_tag': 'clicked_no' } } }, 'style': { 'type': 'big_picture', 'big_picture': 'bigpic.png', 'title': 'A title', 'summary': 'A summary' }, 'sound': 'cowbell.mp3' } })
def test_amazon_unicode(self): self.assertEqual( ua.notification( amazon=ua.amazon( alert=u'Amazon test', expires_after=u'100', ) ), { 'amazon': { 'alert': 'Amazon test', 'expires_after': '100', } } )
def test_amazon(self): self.assertEqual( ua.notification( amazon=ua.amazon( alert='Amazon test', title='My Title', consolidation_key='123456', expires_after=100, summary='Summary of message', extra={'more': 'stuff'}, interactive={ 'type': 'a_type', 'button_actions': { 'yes': { 'add_tag': 'clicked_yes' }, 'no': { 'add_tag': 'clicked_no' } } } ) ), { 'amazon': { 'alert': 'Amazon test', 'title': 'My Title', 'consolidation_key': '123456', 'expires_after': 100, 'summary': 'Summary of message', 'extra': { 'more': 'stuff', }, 'interactive': { 'type': 'a_type', 'button_actions': { 'yes': { 'add_tag': 'clicked_yes' }, 'no': { 'add_tag': 'clicked_no' } } } } } )