Add a unittest to reproduce issue #11

This commit is contained in:
Christophe de Vienne 2013-08-02 13:24:06 +02:00
parent 8cfea4a0a1
commit 8b235ef79a
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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