[test] Cleanup imports in unittest_form
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 07 Mar 2017 11:59:07 +0100
changeset 12005 dcf80f5b7b63
parent 12003 5236ce988805
child 12006 c2230b7f6358
[test] Cleanup imports in unittest_form Remove unused and reorder, + use bare unittest along the way.
cubicweb/web/test/unittest_form.py
--- a/cubicweb/web/test/unittest_form.py	Mon Mar 06 13:49:51 2017 +0100
+++ b/cubicweb/web/test/unittest_form.py	Tue Mar 07 11:59:07 2017 +0100
@@ -18,14 +18,12 @@
 
 import time
 from datetime import datetime
-import pytz
-
-from xml.etree.ElementTree import fromstring
-from lxml import html
 
 from six import text_type
 
-from logilab.common.testlib import unittest_main
+import pytz
+
+from lxml import html
 
 from cubicweb import Binary, ValidationError
 from cubicweb.mttransforms import HAS_TAL
@@ -34,7 +32,7 @@
                                      PasswordField, DateTimeField,
                                      FileField, EditableFileField,
                                      TZDatetimeField)
-from cubicweb.web.formwidgets import PasswordInput, Input, DateTimePicker
+from cubicweb.web.formwidgets import DateTimePicker
 from cubicweb.web.views.forms import EntityFieldsForm, FieldsForm
 from cubicweb.web.views.workflow import ChangeStateForm
 from cubicweb.web.views.formrenderers import FormRenderer
@@ -319,4 +317,5 @@
     #     self.assertEqual(init, cur)
 
 if __name__ == '__main__':
-    unittest_main()
+    import unittest
+    unittest.main()