Test that unsubscribing actually removes the entries from the output

This commit is contained in:
Sam Ruby 2006-10-04 10:50:46 -04:00
parent 6f25618bb0
commit 3fece19638

View File

@ -16,3 +16,11 @@ class SpliceTest(unittest.TestCase):
self.assertEqual('test planet',
doc.getElementsByTagName('title')[0].firstChild.nodeValue)
def test_splice_unsub(self):
config.load(configfile)
config.parser.remove_section('tests/data/spider/testfeed2.atom')
doc = splice()
self.assertEqual(8,len(doc.getElementsByTagName('entry')))
self.assertEqual(3,len(doc.getElementsByTagName('planet:source')))
self.assertEqual(11,len(doc.getElementsByTagName('planet:name')))