summaryrefslogtreecommitdiff
path: root/tests/test_basic_app.py
diff options
context:
space:
mode:
authorAlex Gr?nholm <alex.gronholm@nextday.fi>2011-05-22 05:03:21 +0300
committerAlex Gr?nholm <alex.gronholm@nextday.fi>2011-05-22 05:03:21 +0300
commit1df1c78299e06fecde664d4ddb5ec549097daf88 (patch)
tree39202cc5b606804ae6c5d012cb7b97acfa55eb0c /tests/test_basic_app.py
parentaf0125821babc057b451f659b816216569ce8f26 (diff)
downloadpastedeploy-1df1c78299e06fecde664d4ddb5ec549097daf88.tar.gz
Refactored the code to be compatible with Python 3.1 and above
Diffstat (limited to 'tests/test_basic_app.py')
-rw-r--r--tests/test_basic_app.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_basic_app.py b/tests/test_basic_app.py
index 11d1f40..1ddb52b 100644
--- a/tests/test_basic_app.py
+++ b/tests/test_basic_app.py
@@ -1,9 +1,12 @@
-from paste.deploy import loadapp, loadfilter, appconfig
-from fixture import *
+from paste.deploy import loadapp
+
+from tests.fixture import *
import fakeapp.apps
+
here = os.path.dirname(__file__)
+
def test_main():
app = loadapp('config:sample_configs/basic_app.ini',
relative_to=here)
@@ -18,11 +21,12 @@ def test_main():
relative_to=here, name='main')
assert app is fakeapp.apps.basic_app
+
def test_other():
app = loadapp('config:sample_configs/basic_app.ini#other',
relative_to=here)
assert app is fakeapp.apps.basic_app2
-
+
def test_composit():
app = loadapp('config:sample_configs/basic_app.ini#remote_addr',
@@ -30,5 +34,3 @@ def test_composit():
assert isinstance(app, fakeapp.apps.RemoteAddrDispatch)
assert app.map['127.0.0.1'] is fakeapp.apps.basic_app
assert app.map['0.0.0.0'] is fakeapp.apps.basic_app2
-
-