本文整理汇总了Python中agilito.models.Project.delete方法的典型用法代码示例。如果您正苦于以下问题:Python Project.delete方法的具体用法?Python Project.delete怎么用?Python Project.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类agilito.models.Project
的用法示例。
在下文中一共展示了Project.delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestUS49Base
# 需要导入模块: from agilito.models import Project [as 别名]
# 或者: from agilito.models.Project import delete [as 别名]
class TestUS49Base(SeleniumBase):
def setUp(self):
self.user = User(username = 'User A')
self.passwd = 'hi'
self.user.set_password(self.passwd)
self.user.save()
self.project = Project(name = 'A Project')
self.project.save()
self.project.project_members.add(self.user)
self.project.save()
self.iteration = Iteration(start_date = '1990-01-01',
end_date = '2020-01-01',
project = self.project)
self.iteration.save()
self.story = UserStory(name = 'ABC', project = self.project,
description = 'a userstory about abc',
iteration = self.iteration, planned = 42, rank = 1,
state = 10, blocked = True)
self.story.save()
task_states = dict((v, k) for (k, v) in Task.STATES)
self.task_a = Task(name = "Task A", estimate = 8, remaining = 8,
state = task_states['In Progress'],
owner = self.user, user_story = self.story)
self.task_a.save()
self.task_b = Task(name = "Task B", estimate = 2, remaining = 2,
state = task_states['Defined'],
owner = self.user, user_story = self.story)
self.task_b.save()
super(TestUS49Base, self).setUp()
def tearDown(self):
self.project.delete()
self.user.delete()
super(TestUS49Base, self).tearDown()
示例2: TestBacklogAddUSDetailed
# 需要导入模块: from agilito.models import Project [as 别名]
# 或者: from agilito.models.Project import delete [as 别名]
class TestBacklogAddUSDetailed(SeleniumBase):
def setUp(self):
self.user = User(username='User BBB')
self.passwd = 'hi'
self.user.set_password(self.passwd)
self.user.save()
self.project = Project(name='A Project BB')
self.project.save()
self.project.project_members.add(self.user)
self.project.save()
self.story1 = UserStory(name='User Story A', rank=3, planned=3, project=self.project)
self.story1.save()
self.story2 = UserStory(name='User Story B', rank=2, planned=8, project=self.project)
self.story2.save()
self.story3 = UserStory(name='User Story C', rank=1, planned=5, project=self.project)
self.story3.save()
super(TestBacklogAddUSDetailed, self).setUp()
def tearDown(self):
self.project.delete()
self.user.delete()
for x in self.story1, self.story2, self.story3:
x.delete()
super(TestBacklogAddUSDetailed, self).tearDown()
def test_create_complete_us(self):
self.login(username='User BBB', password='hi')
b = self.browser
b.click("link=Backlog")
b.wait()
b.click("create-detailed-user-story")
b.type("id_name", "A sample detailed user story")
b.type("id_description", "This is a detailed user story")
b.type("id_planned", "10")
b.type("id_rank", "50")
b.type("id_state", "10")
b.click("id_blocked")
b.click("us-create")
self.assertEqual(b.get_text("us-span-4"),
"A sample detailed user story")
示例3: TestBacklogQuickAdd
# 需要导入模块: from agilito.models import Project [as 别名]
# 或者: from agilito.models.Project import delete [as 别名]
class TestBacklogQuickAdd(SeleniumBase):
def setUp(self):
self.user = User(username='User AB')
self.passwd = 'hi'
self.user.set_password(self.passwd)
self.user.save()
self.project = Project(name='A Project')
self.project.save()
self.project.project_members.add(self.user)
self.project.save()
self.story1 = UserStory(name='User Story A', rank=3, planned=3, project=self.project)
self.story1.save()
self.story2 = UserStory(name='User Story B', rank=2, planned=8, project=self.project)
self.story2.save()
self.story3 = UserStory(name='User Story C', rank=1, planned=5, project=self.project)
self.story3.save()
super(TestBacklogQuickAdd, self).setUp()
def tearDown(self):
self.project.delete()
self.user.delete()
for x in self.story1, self.story2, self.story3:
x.delete()
super(TestBacklogQuickAdd, self).tearDown()
def test_tc4(self):
self.login(username='User AB', password='hi')
#sel.open("/accounts/login/")
#sel.type("id_username", "User B")
#sel.type("id_password", "hi")
#sel.click("//input[@value='login']")
b = self.browser
b.click("link=Backlog")
b.wait()
b.click("create-user-story")
b.type("id_name", "A sample user story")
b.click("us-create")
self.assertEqual(b.get_text("us-span-4"),
"A sample user story")