web/test/unittest_views_baseviews.py
changeset 8941 7b26fe71404f
parent 8694 d901c36bcfce
child 9137 c791d8fddc15
--- a/web/test/unittest_views_baseviews.py	Fri Apr 26 11:53:47 2013 +0200
+++ b/web/test/unittest_views_baseviews.py	Fri Apr 26 12:10:37 2013 +0200
@@ -21,7 +21,7 @@
 
 from cubicweb.devtools.testlib import CubicWebTC
 from cubicweb.utils import json
-from cubicweb.view import StartupView, TRANSITIONAL_DOCTYPE_NOEXT
+from cubicweb.view import StartupView, TRANSITIONAL_DOCTYPE
 from cubicweb.web.htmlwidgets import TableWidget
 from cubicweb.web.views import vid_from_rset
 
@@ -133,31 +133,26 @@
             html_source = self.view('my-view').source
             source_lines = [line.strip() for line in html_source.splitlines(False)
                             if line.strip()]
-            self.assertListEqual(source_lines[:2],
-                                 ['<!DOCTYPE html>',
-                                  '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:cubicweb="http://www.logilab.org/2008/cubicweb" xml:lang="en" lang="en">'])
+            self.assertListEqual(['<!DOCTYPE html>', '<html lang="en">'], source_lines[:2])
 
     def test_set_doctype_no_reset_xmldecl(self):
         """
         tests `cubicweb.web.request.CubicWebRequestBase.set_doctype`
         with no xmldecl reset
         """
-        html_doctype = TRANSITIONAL_DOCTYPE_NOEXT.strip()
+        html_doctype = TRANSITIONAL_DOCTYPE.strip()
         class MyView(StartupView):
             __regid__ = 'my-view'
             def call(self):
                 self._cw.set_doctype(html_doctype, reset_xmldecl=False)
-                self._cw.main_stream.set_namespaces([('xmlns', 'http://www.w3.org/1999/xhtml')])
                 self._cw.main_stream.set_htmlattrs([('lang', 'cz')])
 
         with self.temporary_appobjects(MyView):
             html_source = self.view('my-view').source
             source_lines = [line.strip() for line in html_source.splitlines(False)
                             if line.strip()]
-            self.assertListEqual(source_lines[:3],
-                                 ['<?xml version="1.0" encoding="UTF-8"?>',
-                                  html_doctype,
-                                  '<html xmlns="http://www.w3.org/1999/xhtml" lang="cz">'])
+            self.assertListEqual([html_doctype, '<html lang="cz">', '<head>'],
+                                 source_lines[:3])
 
 if __name__ == '__main__':
     unittest_main()