diff MoinMoin/conftest.py @ 4441:f02b3e7dffe6

fixed wsgiapplication tests factored the wsgi application to a configurable class added correct config passing
author Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
date Sat, 27 Dec 2008 19:03:30 +0100
parents 62177a952833
children fb0cce9e8621
line wrap: on
line diff
--- a/MoinMoin/conftest.py	Mon Dec 29 02:09:32 2008 +0100
+++ b/MoinMoin/conftest.py	Sat Dec 27 19:03:30 2008 +0100
@@ -31,7 +31,7 @@
 
 from MoinMoin.support.python_compatibility import set
 from MoinMoin.web.request import TestRequest, Client
-from MoinMoin.wsgiapp import application, init
+from MoinMoin.wsgiapp import Application, init
 from MoinMoin._tests import maketestwiki, wikiconfig
 
 coverage_modules = set()
@@ -94,9 +94,12 @@
         cls = self.obj
         if hasattr(cls, 'Config'):
             cls.request = init_test_request(given_config=cls.Config)
+            cls.client = Client(Application(cls.Config))
         else:
             cls.request = self.parent.request
-        cls.client = Client(application)
+            #XXX: this is the extremely messy way to configure the wsgi app
+            #     with the correct testing config
+            cls.client = Client(Application(self.parent.request.cfg.__class__))
         super(MoinClassCollector, self).setup()