Mercurial > hg > simpypi
comparison tests/test.py @ 18:90777e79ea13
fix up factory (i hope)
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Tue, 28 Feb 2012 15:47:05 -0800 |
| parents | 9879140a2026 |
| children | 486a4640fc31 |
comparison
equal
deleted
inserted
replaced
| 17:77357c5c33c2 | 18:90777e79ea13 |
|---|---|
| 5 """ | 5 """ |
| 6 | 6 |
| 7 import doctest | 7 import doctest |
| 8 import os | 8 import os |
| 9 import shutil | 9 import shutil |
| 10 import simpypi | |
| 11 import sys | 10 import sys |
| 12 import tempfile | 11 import tempfile |
| 13 from optparse import OptionParser | 12 from optparse import OptionParser |
| 14 from paste.fixture import TestApp | 13 from paste.fixture import TestApp |
| 14 import simpypi.factory import factory | |
| 15 | 15 |
| 16 class SimpypiTestApp(TestApp): | 16 class SimpypiTestApp(TestApp): |
| 17 """WSGI app wrapper for testing simpypi""" | 17 """WSGI app wrapper for testing simpypi""" |
| 18 | 18 |
| 19 | 19 def __init__(self, directory): |
| 20 app = factory(directory=directory) | |
| 21 TestApp.__init__(self, app) | |
| 20 | 22 |
| 21 def run_tests(raise_on_error=False, report_first=False): | 23 def run_tests(raise_on_error=False, report_first=False): |
| 22 | 24 |
| 23 # add results here | 25 # add results here |
| 24 results = {} | 26 results = {} |
