aboutsummaryrefslogtreecommitdiffstats
path: root/test_generate_html.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_generate_html.py')
-rwxr-xr-xtest_generate_html.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/test_generate_html.py b/test_generate_html.py
index 18e9316..d302da3 100755
--- a/test_generate_html.py
+++ b/test_generate_html.py
@@ -2,8 +2,7 @@
import unittest
import generate_html_cs as generate_html
import subprocess
-#import sys
-import lxml.etree as et
+import xml.etree.ElementTree as et
import lxml.html
TEST_FILE = "hes12kni.tab"
@@ -62,7 +61,7 @@ class TestProcessLosungen(unittest.TestCase):
stdin=subprocess.PIPE,
bufsize=-1,
close_fds=True)
- proc.communicate(self.los_elements.encode("utf-8"))
+ proc.communicate(self.los_elements.encode())
self.assertEqual(proc.returncode, 0)
def test_attributes_on_articles(self):
@@ -75,7 +74,7 @@ class TestProcessLosungen(unittest.TestCase):
# We need one <script> and one <style> elements in <head>
root = lxml.html.fromstring(self.los_elements)
script_element = root.xpath("//head/script")
- self.assertEqual(len(script_element), 1)
+ self.assertEqual(len(script_element), 2)
self.assertEqual(script_element[0].attrib["src"], "hesla.js")
style_element = root.xpath("//head/link[@rel='stylesheet']")
self.assertEqual(len(style_element), 1)