本文整理汇总了Python中nailgun.objects.DeploymentGraph.get_by_uid方法的典型用法代码示例。如果您正苦于以下问题:Python DeploymentGraph.get_by_uid方法的具体用法?Python DeploymentGraph.get_by_uid怎么用?Python DeploymentGraph.get_by_uid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nailgun.objects.DeploymentGraph
的用法示例。
在下文中一共展示了DeploymentGraph.get_by_uid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_graph_delete
# 需要导入模块: from nailgun.objects import DeploymentGraph [as 别名]
# 或者: from nailgun.objects.DeploymentGraph import get_by_uid [as 别名]
def test_graph_delete(self):
graph_id = self.custom_graph.id
resp = self.app.delete(
reverse(
'DeploymentGraphHandler',
kwargs={'obj_id': graph_id}
),
headers=self.default_headers,
expect_errors=True
)
self.assertEqual(204, resp.status_code)
graph = DeploymentGraph.get_by_uid(graph_id)
self.assertIsNone(graph)
resp = self.app.get(
reverse(
'DeploymentGraphHandler',
kwargs={'obj_id': graph_id}
),
headers=self.default_headers,
expect_errors=True
)
self.assertEqual(404, resp.status_code)