# HG changeset patch # User Jeff Hammel # Date 1330472825 28800 # Node ID 90777e79ea136d310d6f6c62ab2f01ebcef684c4 # Parent 77357c5c33c283f771724473698b2d35bcd49f45 fix up factory (i hope) diff -r 77357c5c33c2 -r 90777e79ea13 simpypi/wsgi.py --- 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): diff -r 77357c5c33c2 -r 90777e79ea13 tests/test.py --- 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):