Exemple #1
0
 def test_create_or_update_fxos_feed_link_update_title(self, objects):
     feed_link = Mock(title='Old Title')
     objects.get_or_create.return_value = (feed_link, False)
     update_firefox_os_feeds.create_or_update_fxos_feed_link(
         'xx', 'http://example.com', 'Title')
     objects.get_or_create.assert_called_with(
         locale='xx', link='http://example.com', defaults={'title': 'Title'})
     feed_link.save.assert_called_with(update_fields=['title'])
Exemple #2
0
 def test_create_or_update_fxos_feed_link(self, objects):
     objects.get_or_create.return_value = ('feed_link', True)
     update_firefox_os_feeds.create_or_update_fxos_feed_link(
         'xx', 'http://example.com', 'Title')
     objects.get_or_create.assert_called_with(
         locale='xx', link='http://example.com', defaults={'title': 'Title'})