# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1234968518 -3600 # Node ID 7d49d871b18cf91d213666b786664e88a1f859f5 # Parent 860451b72ab7fec8c3a13c0adcb2a697f7b4b786 test update diff -r 860451b72ab7 -r 7d49d871b18c 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)