本文整理匯總了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")