Skip to content

Commit

Permalink
fix 404 errors to distribute during unit testing
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Klo <jim.klo@sri.com>
  • Loading branch information
jimklo committed May 9, 2013
1 parent 16c1586 commit 831d2c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion LR/lr/tests/__init__.py
Expand Up @@ -16,7 +16,7 @@
from webtest import TestApp,AppError
from datetime import datetime
import pylons.test
import logging
import logging, wsgi_intercept
from nose.tools import raises
log = logging.getLogger(__name__)
__all__ = ['environ', 'url', 'TestController']
Expand All @@ -38,6 +38,11 @@ def __init__(self, *args, **kwargs):
TestCase.__init__(self, *args, **kwargs)
self.from_date = datetime(1990,1,1).isoformat() + "Z"
self.controllerName = None
def get_wsgiapp():
return wsgiapp
wsgi_intercept.add_wsgi_intercept('localhost', 80, get_wsgiapp)
wsgi_intercept.add_wsgi_intercept('127.0.0.1', 80, get_wsgiapp)


def test_error(self):
resp = self.app.get(url(controller='foo'), status=404)
Expand Down
2 changes: 1 addition & 1 deletion LR/setup.py
Expand Up @@ -17,7 +17,7 @@
"couchdb==0.8", "lxml==2.3", "iso8601plus==0.1.5", "ijson==0.8.0", "WebTest==1.1",
"pystache==0.3.1", "PyJWT==0.1.4", "Couchapp==0.8.1", "PyBrowserID>=0.5.0",
"LRSignature>=0.1.13", "python-gnupg>=0.3.0", "oauth2==1.5.211", "jsonschema==0.8.0",
"Sphinx>=1.1.3", "sphinxcontrib-httpdomain==1.1.7", "Yapsy==1.10.1-pythons2n3"
"Sphinx>=1.1.3", "sphinxcontrib-httpdomain==1.1.7", "Yapsy==1.10.1-pythons2n3", "wsgi-intercept==0.5.1"
],
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
Expand Down

0 comments on commit 831d2c6

Please sign in to comment.