[web test] make unittest_viewselectors work if rdflib isn't available stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 24 Oct 2012 09:56:52 +0200
branchstable
changeset 8591 f7c07e9d4f2e
parent 8590 c9e04bf7690a
child 8596 bd4f5052a532
child 8597 293a595f4365
[web test] make unittest_viewselectors work if rdflib isn't available
selectors.py
web/test/unittest_viewselector.py
--- a/web/test/unittest_viewselector.py	Tue Oct 23 12:12:43 2012 +0200
+++ b/web/test/unittest_viewselector.py	Wed Oct 24 09:56:52 2012 +0200
@@ -53,6 +53,11 @@
 
 assert RDFVIEWS
 
+if hasattr(rdf, 'RDFView'): # not available if rdflib not installed
+    RDFVIEWS = [('rdf', rdf.RDFView)]
+else:
+    RDFVIEWS = []
+
 class ViewSelectorTC(CubicWebTC):
 
     def setup_database(self):