def test_update_withtout_pk(self):
"""
test how update function will handle when we are not going to pass pk value
"""
resource = SingleResource(objects_class=None)
env = create_environ(path='/')
req = Request(env)
req.context = {
'doc': {}
}
resp = Response()
with self.assertRaises(Exception):
resource.on_patch(req, resp)
评论列表
文章目录