Ejemplo n.º 1
0
 def test_deleted_item_reshared(self):
     item = SharedItem()
     item.feed_type = ['shared', 'deleted']
     entry = {'feed_link': 'shared-content.xml'}
     item.assign_feeds(**entry)
     self.assertEqual(len(item.feed_type), 1)
     self.assertTrue('shared' in item.feed_type)
Ejemplo n.º 2
0
 def  test_deleted_item_reshared(self):
     item = SharedItem()
     item.feed_type = ['shared', 'deleted']
     entry = {'feed_link': 'shared-content.xml'}
     item.assign_feeds(**entry)
     self.assertEqual(len(item.feed_type), 1)
     self.assertTrue('shared' in item.feed_type)
Ejemplo n.º 3
0
 def test_delete_sharing_on_selected_item(self):
     item = SharedItem()
     item.feed_type = ['shared', 'selected']
     entry = {
         'feed_link': 'atom-deleted.xml',
         'push_deletion_type': 'featured',
     }
     item.assign_feeds(**entry)
     self.assertEqual(len(item.feed_type), 1)
     self.assertTrue('deleted' in item.feed_type)
Ejemplo n.º 4
0
 def test_delete_sharing_on_selected_item(self):
     item = SharedItem()
     item.feed_type = ['shared', 'selected']
     entry = {
         'feed_link': 'atom-deleted.xml',
         'push_deletion_type': 'featured',
     }
     item.assign_feeds(**entry)
     self.assertEqual(len(item.feed_type), 1)
     self.assertTrue('deleted' in item.feed_type)
Ejemplo n.º 5
0
 def setUp(self):
     self.config = testing.setUp()
     self.config.registry.settings['push.solr_uri'] = 'foo'
     self.root = Root()
     self.root.shared = SharedItems()
     item = SharedItem()
     uid = 'uuuuid'
     self.uid = uid
     item.__name__ = uid
     item.__parent__ = uid
     item.feed_type = ['selected', 'deleted']
     self.root.shared['uuuuid'] = item
     self.solr = FakeSolr()
     self.solr.catalog[uid] = [item]
     self.item = item
Ejemplo n.º 6
0
 def setUp(self):
     self.config = testing.setUp()
     self.config.registry.settings['push.solr_uri'] = 'foo'
     self.root = Root()
     self.root.shared = SharedItems()
     item = SharedItem()
     uid = 'uuuuid'
     self.uid = uid
     item.__name__ = uid
     item.__parent__ = uid
     item.feed_type = ['selected', 'deleted']
     self.root.shared['uuuuid'] = item
     self.solr = FakeSolr()
     self.solr.catalog[uid] = [item]
     self.item = item