本文整理汇总了Python中djangodav.views.DavView.delete方法的典型用法代码示例。如果您正苦于以下问题:Python DavView.delete方法的具体用法?Python DavView.delete怎么用?Python DavView.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类djangodav.views.DavView
的用法示例。
在下文中一共展示了DavView.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_delete_exists
# 需要导入模块: from djangodav.views import DavView [as 别名]
# 或者: from djangodav.views.DavView import delete [as 别名]
def test_delete_exists(self):
target = self.sub_object
v = DavView(path=target.get_path(), acl_class=FullAcl, resource_class=Mock(), lock_class=DummyLock)
v.__dict__['resource'] = target
request = HttpRequest()
target.delete = Mock()
resp = v.delete(request, target.get_path())
self.assertTrue(target.delete.called)
self.assertEqual(204, resp.status_code)