[Checkins] SVN: gocept.selenium/trunk/src/gocept/selenium/ Implement TestCase for plonetesting flavour
Wolfgang Schnerring
wosc at wosc.de
Tue Dec 28 04:35:00 EST 2010
Log message for revision 119182:
Implement TestCase for plonetesting flavour
Changed:
U gocept.selenium/trunk/src/gocept/selenium/base.py
U gocept.selenium/trunk/src/gocept/selenium/plonetesting/__init__.py
U gocept.selenium/trunk/src/gocept/selenium/plonetesting/testing.py
U gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone3/test_plone3.py
U gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone4/test_plone4.py
U gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/zope2/test_zope2.py
-=-
Modified: gocept.selenium/trunk/src/gocept/selenium/base.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/base.py 2010-12-28 09:30:23 UTC (rev 119181)
+++ gocept.selenium/trunk/src/gocept/selenium/base.py 2010-12-28 09:35:00 UTC (rev 119182)
@@ -82,8 +82,11 @@
# the.actual.base.TestCase):
# pass
+ @property
+ def selenium(self):
+ return self.layer.selenium
+
def setUp(self):
super(TestCase, self).setUp()
- self.selenium = self.layer.selenium
self.selenium.setContext('%s.%s' % (
self.__class__.__name__, getattr(self, TEST_METHOD_NAME)))
Modified: gocept.selenium/trunk/src/gocept/selenium/plonetesting/__init__.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plonetesting/__init__.py 2010-12-28 09:30:23 UTC (rev 119181)
+++ gocept.selenium/trunk/src/gocept/selenium/plonetesting/__init__.py 2010-12-28 09:35:00 UTC (rev 119182)
@@ -15,6 +15,7 @@
import gocept.selenium.base
import plone.testing
import plone.testing.z2
+import unittest
# XXX it would be nicer to reuse plone.testing.z2.ZSERVER_FIXTURE,
@@ -48,3 +49,13 @@
SELENIUM = Layer()
+
+
+class TestCase(gocept.selenium.base.TestCase, unittest.TestCase):
+
+ @property
+ def selenium(self):
+ return self.layer['selenese']
+
+ def getRootFolder(self):
+ return self.layer['app']
Modified: gocept.selenium/trunk/src/gocept/selenium/plonetesting/testing.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plonetesting/testing.py 2010-12-28 09:30:23 UTC (rev 119181)
+++ gocept.selenium/trunk/src/gocept/selenium/plonetesting/testing.py 2010-12-28 09:35:00 UTC (rev 119182)
@@ -19,7 +19,6 @@
from plone.testing.z2 import FunctionalTesting
from gocept.selenium import plonetesting
-import gocept.selenium.tests.isolation
class Isolation(Layer):
@@ -37,15 +36,10 @@
name="gocept.selenium:FunctionalIsolation")
-class IsolationTests(gocept.selenium.tests.isolation.IsolationTests):
- """plone.testing implementation of methods needed by base class"""
+class IsolationTestHelper(object):
+ """
+ plone.testing implementation of methods needed by common isolation tests
+ """
- @property
- def selenium(self):
- return self.layer['selenese']
-
def getDatabase(self):
return self.layer['zodbDB']
-
- def getRootFolder(self):
- return self.layer['app']
Modified: gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone3/test_plone3.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone3/test_plone3.py 2010-12-28 09:30:23 UTC (rev 119181)
+++ gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone3/test_plone3.py 2010-12-28 09:35:00 UTC (rev 119182)
@@ -23,7 +23,9 @@
from gocept.selenium import plonetesting
from gocept.selenium.plonetesting import testing
+import gocept.selenium.tests.isolation
+
PLONE_ISOLATION = FunctionalTesting(
bases=(testing.ISOLATION, PLONE_FIXTURE),
name="gocept.selenium:PloneIsolation")
@@ -33,8 +35,9 @@
name="gocept.selenium:Plone3")
-class Plone3Tests(unittest.TestCase,
- testing.IsolationTests):
+class Plone3Tests(gocept.selenium.tests.isolation.IsolationTests,
+ testing.IsolationTestHelper,
+ plonetesting.TestCase):
layer = PLONE_SELENIUM
Modified: gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone4/test_plone4.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone4/test_plone4.py 2010-12-28 09:30:23 UTC (rev 119181)
+++ gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/plone4/test_plone4.py 2010-12-28 09:35:00 UTC (rev 119182)
@@ -23,7 +23,9 @@
from gocept.selenium import plonetesting
from gocept.selenium.plonetesting import testing
+import gocept.selenium.tests.isolation
+
PLONE_ISOLATION = FunctionalTesting(
bases=(testing.ISOLATION, PLONE_FIXTURE),
name="gocept.selenium:PloneIsolation")
@@ -33,8 +35,9 @@
name="gocept.selenium:Plone4")
-class Plone4Tests(unittest.TestCase,
- testing.IsolationTests):
+class Plone4Tests(gocept.selenium.tests.isolation.IsolationTests,
+ testing.IsolationTestHelper,
+ plonetesting.TestCase):
layer = PLONE_SELENIUM
Modified: gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/zope2/test_zope2.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/zope2/test_zope2.py 2010-12-28 09:30:23 UTC (rev 119181)
+++ gocept.selenium/trunk/src/gocept/selenium/plonetesting/tests/zope2/test_zope2.py 2010-12-28 09:35:00 UTC (rev 119182)
@@ -14,6 +14,7 @@
import gocept.selenium.plonetesting
import gocept.selenium.plonetesting.testing
+import gocept.selenium.tests.isolation
import plone.testing
import unittest
@@ -24,8 +25,9 @@
name="gocept.selenium:Zope2")
-class Zope2Tests(unittest.TestCase,
- gocept.selenium.plonetesting.testing.IsolationTests):
+class Zope2Tests(gocept.selenium.tests.isolation.IsolationTests,
+ gocept.selenium.plonetesting.testing.IsolationTestHelper,
+ gocept.selenium.plonetesting.TestCase):
layer = ZOPE2_ISOLATION
More information about the checkins
mailing list