planet/tests/test_splice.py
2006-09-03 09:14:39 -04:00

19 lines
575 B
Python

#!/usr/bin/env python
import unittest
from planet.splice import splice, config
configfile = 'tests/data/splice/config.ini'
class SpliceTest(unittest.TestCase):
def test_splice(self):
config.load(configfile)
doc = splice()
self.assertEqual(12,len(doc.getElementsByTagName('entry')))
self.assertEqual(4,len(doc.getElementsByTagName('planet:source')))
self.assertEqual(16,len(doc.getElementsByTagName('planet:name')))
self.assertEqual('test planet',
doc.getElementsByTagName('title')[0].firstChild.nodeValue)