diff --git a/tests/pecantest/test/controllers/ws.py b/tests/pecantest/test/controllers/ws.py index 12bdd66..cddaec0 100644 --- a/tests/pecantest/test/controllers/ws.py +++ b/tests/pecantest/test/controllers/ws.py @@ -89,3 +89,7 @@ class AuthorsController(RestController): def post(self, author): author.id = 10 return author + + @wsmeext.pecan.wsexpose(None, int) + def delete(self, author_id): + print "Deleting", author_id diff --git a/tests/pecantest/test/tests/test_ws.py b/tests/pecantest/test/tests/test_ws.py index 7916672..d494348 100644 --- a/tests/pecantest/test/tests/test_ws.py +++ b/tests/pecantest/test/tests/test_ws.py @@ -123,3 +123,7 @@ class TestWS(FunctionalTest): print book assert book['id'] == 2 assert book['author']['id'] == 1 + + def test_no_content_type_if_no_return_type(self): + res = self.app.delete('/authors/4') + assert "Content-Type" not in res.headers