diff options
author | Jonathan LaCour <jonathan@dreamhost.com> | 2012-03-11 09:52:25 -0700 |
---|---|---|
committer | Jonathan LaCour <jonathan@dreamhost.com> | 2012-03-11 09:52:25 -0700 |
commit | bed5cbfa147a202b2736295c286f567604efcd3e (patch) | |
tree | f6dd1d18d72a4acd3b5239a30d424e5513bbc099 /pecan/tests/test_generic.py | |
parent | 20a996b58d741c83e274352a6ad335b5da227efe (diff) | |
download | pecan-bed5cbfa147a202b2736295c286f567604efcd3e.tar.gz |
After a full-scale scan with pep8.py and pyflakes, identified and
resolved most of our PEP8 compliance issues.
Diffstat (limited to 'pecan/tests/test_generic.py')
-rw-r--r-- | pecan/tests/test_generic.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pecan/tests/test_generic.py b/pecan/tests/test_generic.py index 72c5af8..a77338e 100644 --- a/pecan/tests/test_generic.py +++ b/pecan/tests/test_generic.py @@ -1,36 +1,36 @@ -from pecan import Pecan, expose, request, response, redirect +from pecan import Pecan, expose from unittest import TestCase from webtest import TestApp try: from simplejson import dumps except: - from json import dumps + from json import dumps # noqa class TestGeneric(TestCase): - - def test_simple_generic(self): + + def test_simple_generic(self): class RootController(object): @expose(generic=True) def index(self): pass - + @index.when(method='POST', template='json') def do_post(self): return dict(result='POST') - + @index.when(method='GET') def do_get(self): return 'GET' - + app = TestApp(Pecan(RootController())) r = app.get('/') assert r.status_int == 200 assert r.body == 'GET' - + r = app.post('/') assert r.status_int == 200 assert r.body == dumps(dict(result='POST')) - + r = app.get('/do_get', status=404) assert r.status_int == 404 |