Skip to content

Commit

Permalink
[#1659] move WsgiAppCase to new_tests/controllers/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Jun 5, 2014
1 parent 4a2f8dc commit 773d198
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
13 changes: 13 additions & 0 deletions ckan/new_tests/controllers/__init__.py
Expand Up @@ -51,3 +51,16 @@
code's behavior into a test harness before it can be safely refactored.
'''

import paste.fixture
from pylons.test import pylonsapp


class WsgiAppCase(object):
wsgiapp = pylonsapp
assert wsgiapp, 'You need to run nose with --with-pylons'
# Either that, or this file got imported somehow before the tests started
# running, meaning the pylonsapp wasn't setup yet (which is done in
# pylons.test.py:begin())
app = paste.fixture.TestApp(wsgiapp)

11 changes: 1 addition & 10 deletions ckan/new_tests/controllers/test_util.py
Expand Up @@ -4,16 +4,7 @@

from routes import url_for as url_for


# This is stolen from the old tests and should probably go in __init__.py
# if it is what we want.
class WsgiAppCase(object):
wsgiapp = pylonsapp
assert wsgiapp, 'You need to run nose with --with-pylons'
# Either that, or this file got imported somehow before the tests started
# running, meaning the pylonsapp wasn't setup yet (which is done in
# pylons.test.py:begin())
app = paste.fixture.TestApp(wsgiapp)
from ckan.new_tests.controllers import WsgiAppCase


class TestUtil(WsgiAppCase):
Expand Down

0 comments on commit 773d198

Please sign in to comment.