def test_django_config_context(self):
     config.load('tests/data/filter/django/test.ini')
     feed = open('tests/data/filter/django/test.xml')
     input = feed.read(); feed.close()
     results = dj.run(
         os.path.realpath('tests/data/filter/django/config.html.dj'), input)
     self.assertEqual(results, "Django on Venus\n")
示例#2
0
 def test_django_config_context(self):
     config.load('tests/data/filter/django/test.ini')
     feed = open('tests/data/filter/django/test.xml')
     input = feed.read(); feed.close()
     results = dj.run(
         os.path.realpath('tests/data/filter/django/config.html.dj'), input)
     self.assertEqual(results, "Django on Venus\n")
 def test_django_entry_title(self):
     config.load('tests/data/filter/django/test.ini')
     feed = open('tests/data/filter/django/test.xml')
     input = feed.read(); feed.close()
     results = dj.run(
         os.path.realpath('tests/data/filter/django/title.html.dj'), input)
     self.assertEqual(results, u"\xa1Atom-Powered Robots Run Amok!\n")
 def test_django_entry_title(self):
     config.load("tests/data/filter/django/test.ini")
     feed = open("tests/data/filter/django/test.xml")
     input = feed.read()
     feed.close()
     results = dj.run(os.path.realpath("tests/data/filter/django/title.html.dj"), input)
     self.assertEqual(results, u"\xa1Atom-Powered <b>Robots</b> Run Amok!\n")
示例#5
0
 def test_django_entry_title(self):
     config.load('tests/data/filter/django/test.ini')
     feed = open('tests/data/filter/django/test.xml')
     input = feed.read()
     feed.close()
     results = dj.run(
         os.path.realpath('tests/data/filter/django/title.html.dj'), input)
     self.assertEqual(results, "\xc2\xa1Atom-Powered Robots Run Amok!\n")
示例#6
0
 def test_django_entry_title_autoescape_off(self):
     config.load('tests/data/filter/django/test.ini')
     config.parser.set('Planet', 'django_autoescape', 'off')
     feed = open('tests/data/filter/django/test.xml')
     input = feed.read(); feed.close()
     results = dj.run(
         os.path.realpath('tests/data/filter/django/title.html.dj'), input)
     self.assertEqual(results, u"\xa1Atom-Powered <b>Robots</b> Run Amok!\n")
 def test_django_entry_title_autoescape_off(self):
     config.load('tests/data/filter/django/test.ini')
     config.parser.set('Planet', 'django_autoescape', 'off')
     feed = open('tests/data/filter/django/test.xml')
     input = feed.read(); feed.close()
     results = dj.run(
         os.path.realpath('tests/data/filter/django/title.html.dj'), input)
     self.assertEqual(results, u"\xa1Atom-Powered <b>Robots</b> Run Amok!\n")
 def test_django_entry_title_autoescape_off(self):
     config.load("tests/data/filter/django/test.ini")
     config.parser.set("Planet", "django_autoescape", "off")
     feed = open("tests/data/filter/django/test.xml")
     input = feed.read()
     feed.close()
     results = dj.run(os.path.realpath("tests/data/filter/django/title.html.dj"), input)
     self.assertEqual(results, u"\xa1Atom-Powered <b>Robots</b> Run Amok!\n")