[test/view] exclude some Blog entity from automatic view testing cubicweb-version-3.17.0
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Thu, 02 May 2013 15:58:57 +0200
changeset 8961 cc1a0aad580c
parent 8960 14b1a7ace003
child 8962 22be40c492e9
[test/view] exclude some Blog entity from automatic view testing Some Blog view requires the sioc cubes that we extracted in 3.17 we do not really want to test cubes view here. So we exclude CWEtype that really requires the sioc cubes.
web/test/test_views.py
--- a/web/test/test_views.py	Thu May 02 14:30:36 2013 +0200
+++ b/web/test/test_views.py	Thu May 02 15:58:57 2013 +0200
@@ -27,6 +27,14 @@
         'Any COUNT(X) WHERE X is CWUser',
         ]
 
+    def to_test_etypes(self):
+        # We do not really want to test cube views here. So we can drop testing 
+        # some EntityType. The two Blog types below require the sioc cube that 
+        # we do not want to add as a dependency.
+        etypes = super(AutomaticWebTest, self).to_test_etypes()
+        etypes -= set(('Blog', 'BlogEntry'))
+        return etypes
+
 
 class SomeView(AnyRsetView):
     __regid__ = 'someview'