[Checkins] SVN: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/ Implemented the isolation test for the grok layer.

Jan-Jaap Driessen jdriessen at thehealthagency.com
Thu Dec 9 08:54:44 EST 2010


Log message for revision 118763:
  Implemented the isolation test for the grok layer.

Changed:
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py
  U   gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py

-=-
Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py	2010-12-09 13:28:18 UTC (rev 118762)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/fixtures.py	2010-12-09 13:54:43 UTC (rev 118763)
@@ -23,3 +23,20 @@
 
     def render(self):
         return '''<html><body>Hello from grok</body></html>'''
+
+
+class Set(grok.View):
+    grok.name('set.html')
+    grok.context(object)
+
+    def render(self):
+        self.context.foo = 1
+        return u'setting done'
+
+
+class Get(grok.View):
+    grok.name('get.html')
+    grok.context(object)
+
+    def render(self):
+        return str(getattr(self.context, 'foo', 0))

Modified: gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py
===================================================================
--- gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py	2010-12-09 13:28:18 UTC (rev 118762)
+++ gocept.selenium/branches/janjaapdriessen-wsgi/src/gocept/selenium/grok/tests.py	2010-12-09 13:54:43 UTC (rev 118763)
@@ -16,6 +16,7 @@
 import gocept.selenium.grok
 import gocept.selenium.grok.fixtures
 
+import gocept.selenium.tests.isolation
 
 test_layer = gocept.selenium.grok.Layer(gocept.selenium.grok)
 
@@ -37,3 +38,11 @@
     def test_grok_app(self):
         self.selenium.open('/app')
         self.selenium.assertTextPresent('Hello from grok')
+
+
+class GrokIsolation(gocept.selenium.tests.isolation.IsolationTests,
+    gocept.selenium.grok.TestCase):
+
+    layer = test_layer
+
+



More information about the checkins mailing list