changeset 18:90777e79ea13

fix up factory (i hope)
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 28 Feb 2012 15:47:05 -0800
parents 77357c5c33c2
children bf70fc5a115f
files simpypi/wsgi.py tests/test.py
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/simpypi/wsgi.py	Tue Feb 28 15:38:46 2012 -0800
+++ b/simpypi/wsgi.py	Tue Feb 28 15:47:05 2012 -0800
@@ -9,12 +9,13 @@
 
 here = os.path.dirname(os.path.abspath(__file__))
 
-class Dispatcher(object):
+class SimPyPI(object):
 
     ### class level variables
-    defaults = {'auto_reload': 'False',
-                'template_dirs': '',
-                }
+# XXX unneeded for now
+#    defaults = {'auto_reload': 'False',
+#                'template_dirs': '',
+#                }
 
     def __init__(self, directory, index=None):
 
--- a/tests/test.py	Tue Feb 28 15:38:46 2012 -0800
+++ b/tests/test.py	Tue Feb 28 15:47:05 2012 -0800
@@ -7,16 +7,18 @@
 import doctest
 import os
 import shutil
-import simpypi
 import sys
 import tempfile
 from optparse import OptionParser
 from paste.fixture import TestApp
+import simpypi.factory import factory
 
 class SimpypiTestApp(TestApp):
     """WSGI app wrapper for testing simpypi"""
 
-
+    def __init__(self, directory):
+        app = factory(directory=directory)
+        TestApp.__init__(self, app)
 
 def run_tests(raise_on_error=False, report_first=False):