[Checkins] SVN: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py A test for multiple WSGI layers.
Jan-Jaap Driessen
jdriessen at thehealthagency.com
Fri Dec 10 08:12:07 EST 2010
Log message for revision 118787:
A test for multiple WSGI layers.
Changed:
U gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py
-=-
Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py 2010-12-10 13:11:12 UTC (rev 118786)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/wsgi/tests.py 2010-12-10 13:12:07 UTC (rev 118787)
@@ -13,15 +13,12 @@
##############################################################################
import gocept.selenium.wsgi
-from gocept.selenium.wsgi.testing import SimpleApp
+from gocept.selenium.wsgi.testing import SimpleApp, SimpleApp2
-test_layer = gocept.selenium.wsgi.Layer(SimpleApp())
-
-
class TestWSGITestCase(gocept.selenium.wsgi.TestCase):
- layer = test_layer
+ layer = gocept.selenium.wsgi.Layer(SimpleApp())
def test_wsgi_layer(self):
self.assertTrue(self.layer.thread.isAlive)
@@ -29,3 +26,13 @@
def test_simple_app(self):
self.selenium.open('/')
self.selenium.assertTextPresent('Hello from javascript')
+
+class TestWSGILayerName(gocept.selenium.wsgi.TestCase):
+ """ We introduce a new test layer with a different application.
+ The name of the application is used in the name of the layer in order
+ to have the testrunner distinguish the two layers."""
+
+ layer = gocept.selenium.wsgi.Layer(SimpleApp2())
+
+ def test_layer_name(self):
+ self.assertEquals(self.layer.__name__, 'Layer.SimpleApp2')
More information about the checkins
mailing list