Files
deb-python-wsme/wsme/tests/test_restjson.py
Christophe de Vienne 3fa27294de Start implementing the rest json proto
--HG--
rename : wsme/tests/__init__.py => wsme/tests/protocol.py
2011-09-18 22:19:38 +02:00

15 lines
384 B
Python

from wsme.tests.protocol import TestProtocol
import json
class TestRestJson(TestProtocol):
protocol = 'REST+Json'
def call(self, fpath, **kw):
content = json.dumps(kw)
res = self.app.post(
'/' + fpath,
content,
headers={
'Content-Type': 'application/json'
})
return json.loads(res.body)