Revert "Controllers that return `None` should be an HTTP 204."

This reverts commit fbcc2c27f7.
This commit is contained in:
Ryan Petrello 2016-09-26 20:05:34 -04:00
parent 6de2baefb6
commit 4cfe319738
2 changed files with 0 additions and 25 deletions

View File

@ -422,8 +422,6 @@ class PecanBase(object):
self.default_renderer,
self.template_path
)
if namespace is None:
return None
return renderer.render(template, namespace)
def find_controller(self, state):

View File

@ -2018,29 +2018,6 @@ class TestEngines(PecanTestCase):
assert r.status_int == 200
assert r.body == b_("Bill")
def test_template_with_no_namespace(self):
class RootController(object):
@expose('mako:mako.html')
def index(self):
return None
app = TestApp(Pecan(
RootController(),
template_path=self.template_path
))
r = app.get('/')
self.assertEqual(r.status_int, 204)
def test_json_with_no_namespace(self):
class RootController(object):
@expose('json')
def index(self):
return None
app = TestApp(Pecan(RootController()))
r = app.get('/')
self.assertEqual(r.status_int, 204)
class TestDeprecatedRouteMethod(PecanTestCase):