web/test/unittest_views_baseforms.py
branchtls-sprint
changeset 801 7d49d871b18c
parent 16 a70ece4d9d1a
child 985 6a25c58a1c23
--- 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)