本文整理汇总了Python中agilito.models.UserStory.delete方法的典型用法代码示例。如果您正苦于以下问题:Python UserStory.delete方法的具体用法?Python UserStory.delete怎么用?Python UserStory.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类agilito.models.UserStory
的用法示例。
在下文中一共展示了UserStory.delete方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_edit_change_us
# 需要导入模块: from agilito.models import UserStory [as 别名]
# 或者: from agilito.models.UserStory import delete [as 别名]
def test_edit_change_us(self):
other_story = UserStory(name='DEF', project=self.project,
description='a userstory about def',
iteration=self.iteration, planned=42, rank=2,
state=20, blocked=False)
other_story.save()
test_case = TestCase(name='ABC Test', description='Test', priority=10,
user_story=self.story)
test_case.save()
pk = test_case.id
pre = TestCase.objects.count()
b = self.browser
b.click("link=Iteration")
b.wait()
b.click("link=ABC")
b.wait()
b.click("xpath=id('edit_testcase_%d')/a/img" % (test_case.id))
b.wait()
b.type("id_name", "hi")
b.type("id_description", "bye")
b.select("id_user_story", "US2: DEF")
self.assertEqual(b.get_selected_label("id_user_story"), "US2: DEF")
b.click("css=#content input[type=submit]")
for i in xrange(15):
b.wait()
self.assertEqual(TestCase.objects.count(), pre)
# reload test_case
test_case = TestCase.objects.get(pk=pk)
self.assertEqual(test_case.name, 'hi')
self.assertEqual(test_case.description, 'bye')
self.assertEqual(test_case.user_story.id, other_story.id)
test_case.delete()
other_story.delete()