reverting tests for validation in sub controllers since the bug is non-existent

This commit is contained in:
Alfredo Deza
2010-11-11 12:37:47 -05:00
parent c421c28488
commit 9cd414fa96

View File

@@ -87,27 +87,8 @@ class TestValidation(object):
]
class SubSubRootController(object):
@expose('json')
def index(self):
redirect('/sub/deeper/not_empty', internal=True)
@expose('json')
def not_empty(self, data):
return data
class SubRootController(object):
@expose('json')
def index(self):
return '/sub'
deeper = SubSubRootController()
class RootController(object):
sub = SubRootController()
@expose()
def errors(self, *args, **kwargs):
assert request.validation_error is not None
@@ -145,12 +126,6 @@ class TestValidation(object):
assert request.validation_error is not None
return 'Success!'
# post some JSON to a sub controller and fail
app = TestApp(make_app(RootController()))
resp = app.post('/sub/deeper', dumps({'name':'foobar'}))
assert resp.body != {}
# test without error handler
app = TestApp(make_app(RootController()))