summaryrefslogtreecommitdiff
path: root/tests/test_filter.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_filter.py
parentaf0125821babc057b451f659b816216569ce8f26 (diff)
downloadpastedeploy-1df1c78299e06fecde664d4ddb5ec549097daf88.tar.gz
Refactored the code to be compatible with Python 3.1 and above
Diffstat (limited to 'tests/test_filter.py')
-rw-r--r--tests/test_filter.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/test_filter.py b/tests/test_filter.py
index 77ee2ee..a76af7c 100644
--- a/tests/test_filter.py
+++ b/tests/test_filter.py
@@ -1,9 +1,11 @@
-from paste.deploy import loadapp, loadfilter
-from fixture import *
+from paste.deploy import loadapp
+from tests.fixture import *
import fakeapp.apps
+
here = os.path.dirname(__file__)
+
def test_filter_app():
app = loadapp('config:sample_configs/test_filter.ini#filt',
relative_to=here)
@@ -11,6 +13,7 @@ def test_filter_app():
assert app.app is fakeapp.apps.basic_app
assert app.method_to_call == 'lower'
+
def test_pipeline():
app = loadapp('config:sample_configs/test_filter.ini#piped',
relative_to=here)
@@ -18,6 +21,7 @@ def test_pipeline():
assert app.app is fakeapp.apps.basic_app
assert app.method_to_call == 'upper'
+
def test_filter_app2():
app = loadapp('config:sample_configs/test_filter.ini#filt2',
relative_to=here)
@@ -25,6 +29,7 @@ def test_filter_app2():
assert app.app is fakeapp.apps.basic_app
assert app.method_to_call == 'lower'
+
def test_pipeline2():
app = loadapp('config:sample_configs/test_filter.ini#piped2',
relative_to=here)
@@ -32,12 +37,14 @@ def test_pipeline2():
assert app.app is fakeapp.apps.basic_app
assert app.method_to_call == 'upper'
+
def test_filter_app_inverted():
app = loadapp('config:sample_configs/test_filter.ini#inv',
relative_to=here)
assert isinstance(app, fakeapp.apps.CapFilter)
assert app.app is fakeapp.apps.basic_app
+
def test_filter_with_filter_with():
app = loadapp('config:sample_configs/test_filter_with.ini',
relative_to=here)