def test_single(self): response = PostResponder.respond( {'id': 1, 'title': 'A title'} ) assert json.loads(response) == { 'posts': {'id': 1, 'title': 'A title'} }
def test_single(self): response = PostResponder.respond({'id': 1, 'title': 'A title'}) assert json.loads(response) == { 'data': { 'attributes': { 'title': 'A title' }, 'id': 1, 'type': 'posts' }, 'jsonapi': JSONAPI_VERSION_DICT }