# HG changeset patch # User Sylvain Thénault # Date 1488884347 -3600 # Node ID dcf80f5b7b636fd01b82714f33b8080102e20e79 # Parent 5236ce988805d44bac9b6fde1c378aa701c6c0d2 [test] Cleanup imports in unittest_form Remove unused and reorder, + use bare unittest along the way. diff -r 5236ce988805 -r dcf80f5b7b63 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()