[test] cleanup: don't need expensive auto_populate(), use a single test class
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 25 Oct 2010 17:53:42 +0200
changeset 6639 90ae7eb3460f
parent 6638 404aff81236c
child 6640 4c4616c02f69
[test] cleanup: don't need expensive auto_populate(), use a single test class
web/test/test_views.py
--- a/web/test/test_views.py	Mon Oct 25 17:42:56 2010 +0200
+++ b/web/test/test_views.py	Mon Oct 25 17:53:42 2010 +0200
@@ -26,16 +26,6 @@
     'Any COUNT(X) WHERE X is CWUser',
     ]
 
-class ComposityCopy(CubicWebTC):
-
-    def test_regr_copy_view(self):
-        """regression test: make sure we can ask a copy of a
-        composite entity
-        """
-        rset = self.execute('CWUser X WHERE X login "admin"')
-        self.view('copy', rset)
-
-
 
 class SomeView(AnyRsetView):
     __regid__ = 'someview'
@@ -46,8 +36,13 @@
 
 
 class ManualCubicWebTCs(AutoPopulateTest):
-    def setup_database(self):
-        self.auto_populate(10)
+
+    def test_regr_copy_view(self):
+        """regression test: make sure we can ask a copy of a
+        composite entity
+        """
+        rset = self.execute('CWUser X WHERE X login "admin"')
+        self.view('copy', rset)
 
     def test_manual_tests(self):
         rset = self.execute('Any P,F,S WHERE P is CWUser, P firstname F, P surname S')
@@ -68,10 +63,6 @@
         source = self.view('someview', rset).source
         self.assertEqual(source.count('spam.js'), 1)
 
-
-
-class ExplicitViewsTest(CubicWebTC):
-
     def test_unrelateddivs(self):
         rset = self.execute('Any X WHERE X is CWUser, X login "admin"')
         group = self.request().create_entity('CWGroup', name=u'R&D')