diff MoinMoin/conftest.py @ 4217:b231877df090

Added werkzeug.test.Client for blackbox application testing (headers, status, output)
author Florian Krupicka <florian.krupicka@googlemail.com>
date Mon, 14 Jul 2008 13:16:57 +0200
parents 1ca179133f01
children 4476d5ca521c
line wrap: on
line diff
--- a/MoinMoin/conftest.py	Mon Jul 14 11:05:19 2008 +0200
+++ b/MoinMoin/conftest.py	Mon Jul 14 13:16:57 2008 +0200
@@ -25,6 +25,7 @@
 
 import py
 
+from werkzeug.test import Client
 
 rootdir = py.magic.autopath().dirpath()
 moindir = rootdir.join("..")
@@ -37,7 +38,7 @@
 
 from MoinMoin.support.python_compatibility import set
 from MoinMoin.web.request import TestRequest
-from MoinMoin.wsgiapp import init as request_init
+from MoinMoin.wsgiapp import application, init
 
 coverage_modules = set()
 
@@ -63,7 +64,6 @@
         coverage.erase()
         coverage.start()
 
-
     py.test.config.addoptions('MoinMoin options', py.test.config.Option('-C',
         '--coverage', action='callback', callback=callback,
         help='Output information about code coverage (slow!)'))
@@ -77,7 +77,7 @@
         maketestwiki.run(True)
         static_state[0] = True
     request = TestRequest()
-    request = request_init(request)
+    request = init(request)
     return request
 
 class TestConfig:
@@ -177,6 +177,7 @@
         cls = self.obj
         cls.request = self.parent.request
         cls.TestConfig = TestConfig(cls.request)
+        cls.client = Client(application)
         super(MoinClassCollector, self).setup()