[Checkins] SVN: gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/ Implement connection isolation tests for ZTK flavour

Wolfgang Schnerring wosc at wosc.de
Sun Dec 26 06:07:20 EST 2010


Log message for revision 119120:
  Implement connection isolation tests for ZTK flavour
  

Changed:
  U   gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/tests/isolation.py
  U   gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/ztk/tests/test_ztk.py

-=-
Modified: gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/tests/isolation.py
===================================================================
--- gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/tests/isolation.py	2010-12-26 10:52:38 UTC (rev 119119)
+++ gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/tests/isolation.py	2010-12-26 11:07:20 UTC (rev 119120)
@@ -21,12 +21,6 @@
     # from each other, i.e. that the underlying DemoStorage stacking is wired
     # up correctly
 
-    def getRootFolder(self):
-        raise NotImplementedError()
-
-    def getDatabase(self):
-        raise NotImplementedError()
-
     def test_0_set(self):
         global ENSURE_ORDER
         self.selenium.open('http://%s/set.html' % self.selenium.server)
@@ -42,6 +36,9 @@
         self.selenium.assertNotBodyText('1')
         ENSURE_ORDER = False
 
+    # subclasses need to implement getRootFolder() and getDatabase()
+    # for the tests below to work
+
     def test_each_request_gets_a_separate_zodb_connection(self):
         self.selenium.open(
             'http://%s/inc-volatile.html' % self.selenium.server)

Modified: gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/ztk/tests/test_ztk.py
===================================================================
--- gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/ztk/tests/test_ztk.py	2010-12-26 10:52:38 UTC (rev 119119)
+++ gocept.selenium/branches/wosc-zodb-isolation/src/gocept/selenium/ztk/tests/test_ztk.py	2010-12-26 11:07:20 UTC (rev 119120)
@@ -12,12 +12,16 @@
 #
 ##############################################################################
 
+import gocept.selenium.tests.isolation
 import gocept.selenium.ztk.testing
-import gocept.selenium.tests.isolation
+import zope.app.testing.functional
 
 
 class ZTKTests(gocept.selenium.tests.isolation.IsolationTests,
                gocept.selenium.ztk.testing.TestCase):
 
+    def getDatabase(self):
+        return zope.app.testing.functional.FunctionalTestSetup().db
+
     def test_selenium_http_500_handling(self):
         self.selenium.open('http://%s/error.html' % self.selenium.server)



More information about the checkins mailing list