Commit 1310725a authored by Philippe Pepiot's avatar Philippe Pepiot
Browse files

Fix test_calendar_inheritance

The behavior of this test depend on side effect of other tests because of the "daytype_cache".
Ensure clearing the cache before making assertion on get_days_type().
parent 50a5a31d6168
......@@ -96,6 +96,7 @@ class DaytypeTests(CubicWebTC):
cal2 = cnx.create_entity('Calendar', title=u'cal2', inherits=self.cal,
weekdays=friday_nw)
cnx.commit()
self.vreg['etypes'].etype_class('Calendar').daytype_cache.clear()
dtypes = self._get_day_types(cal2.eid, date(2010, 7, 12),
date(2010, 7, 18))
self.assertEqual([W, W, NW, W, NW, NW, NW], dtypes)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment