[Checkins] SVN: van.testing/trunk/ Allow users to specify the domain and port of the wsgi_intercept_layer by

Brian Sutherland jinty at web.de
Wed Apr 1 18:02:35 EDT 2009


Log message for revision 98775:
  Allow users to specify the domain and port of the wsgi_intercept_layer by
  adding those attributes to the class.
  

Changed:
  U   van.testing/trunk/CHANGES.txt
  U   van.testing/trunk/van/testing/layer.py

-=-
Modified: van.testing/trunk/CHANGES.txt
===================================================================
--- van.testing/trunk/CHANGES.txt	2009-04-01 21:26:50 UTC (rev 98774)
+++ van.testing/trunk/CHANGES.txt	2009-04-01 22:02:35 UTC (rev 98775)
@@ -4,6 +4,9 @@
 2.0.1 (unknown)
 ------------------
 
+- Allow users to specify the domain and port of the wsgi_intercept_layer by
+  adding those attributes to the class.
+
 2.0.0 (2009-04-01)
 ------------------
 

Modified: van.testing/trunk/van/testing/layer.py
===================================================================
--- van.testing/trunk/van/testing/layer.py	2009-04-01 21:26:50 UTC (rev 98774)
+++ van.testing/trunk/van/testing/layer.py	2009-04-01 22:02:35 UTC (rev 98775)
@@ -113,15 +113,18 @@
 
 def wsgi_intercept_layer(layer):
 
+    domain = getattr(layer, 'domain', 'localhost')
+    port = getattr(layer, 'port', 80)
+
     def make_debug_application():
         return ErrorHandler(layer.make_application())
 
     def setUp(cls):
-        wsgi_intercept.add_wsgi_intercept('localhost', 80, make_debug_application)
+        wsgi_intercept.add_wsgi_intercept(domain, port, make_debug_application)
     layer.setUp = classmethod(setUp)
 
     def tearDown(cls):
-        wsgi_intercept.remove_wsgi_intercept('localhost', 80)
+        wsgi_intercept.remove_wsgi_intercept(domain, port)
 
     def null(cls):
         pass



More information about the Checkins mailing list