Fix error handling tests for pecan
The debug middleware always returns a 200 status, so disable it. The actual response status is the full string, not just the number, so look for that.
This commit is contained in:
parent
38f5dd2bfd
commit
2277370fca
@ -8,9 +8,8 @@ server = {
|
||||
app = {
|
||||
'root' : 'test.controllers.root.RootController',
|
||||
'modules' : ['test'],
|
||||
'static_root' : '%(confdir)s/../../public',
|
||||
'static_root' : '%(confdir)s/../../public',
|
||||
'template_path' : '%(confdir)s/../templates',
|
||||
'debug' : True,
|
||||
'errors' : {
|
||||
'404' : '/error/404',
|
||||
'__force_dict__' : True
|
||||
@ -20,6 +19,6 @@ app = {
|
||||
# Custom Configurations must be in Python dictionary format::
|
||||
#
|
||||
# foo = {'bar':'baz'}
|
||||
#
|
||||
#
|
||||
# All configurations are accessible at::
|
||||
# pecan.conf
|
||||
|
@ -31,7 +31,7 @@ class TestWS(FunctionalTest):
|
||||
expect_errors=True
|
||||
)
|
||||
print res
|
||||
assert res.status == 400
|
||||
self.assertEqual(res.status, '400 Bad Request')
|
||||
a = json.loads(res.body)
|
||||
print a
|
||||
assert a['faultcode'] == 'Client'
|
||||
|
Loading…
x
Reference in New Issue
Block a user