test update tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 18 Feb 2009 15:48:38 +0100
branchtls-sprint
changeset 801 7d49d871b18c
parent 800 860451b72ab7
child 802 251529858b81
test update
web/test/unittest_views_baseforms.py
--- a/web/test/unittest_views_baseforms.py	Wed Feb 18 15:48:02 2009 +0100
+++ b/web/test/unittest_views_baseforms.py	Wed Feb 18 15:48:38 2009 +0100
@@ -3,13 +3,14 @@
 from StringIO import StringIO
 import re
 
+from mx.DateTime import DateTime
+
 from logilab.common.testlib import unittest_main
+from logilab.common.decorators import clear_cache
 from cubicweb.devtools.apptest import EnvBasedTC
-
 from cubicweb.entities import AnyEntity
+from cubicweb.web import widgets
 
-from mx.DateTime import DateTime
-from cubicweb.web import widgets
 orig_today = widgets.today
 orig_now = widgets.now
 
@@ -18,7 +19,7 @@
         return DateTime(0000, 1, 1)
     widgets.today = widgets.now = _today
 
-def teardown_module(options):
+def teardown_module(options, result):
     widgets.today = orig_today
     widgets.now = orig_now
 
@@ -207,6 +208,7 @@
         class BlogEntryPlus(BlogEntry):
             __rtags__ = {'checked_by': 'primary'}
         self.vreg.register_vobject_class(BlogEntryPlus)
+        clear_cache(self.vreg, 'etype_class')
         # an admin should be able to edit the checked_by relation
         html = self._build_creation_form('BlogEntry')
         self.failUnless('name="edits-checked_by:A"' in html)