当前位置: 首页>>代码示例>>Python>>正文


Python models.Project类代码示例

本文整理汇总了Python中taiga.models.Project的典型用法代码示例。如果您正苦于以下问题:Python Project类的具体用法?Python Project怎么用?Python Project使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Project类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_import_milestone

 def test_import_milestone(self, mock_import_milestone):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     time1 = datetime.now()
     time2 = datetime.now()
     project.import_milestone('Milestone 1', time1, time2)
     mock_import_milestone.assert_called_with(1, 'Milestone 1', time1, time2)
开发者ID:BabisK,项目名称:python-taiga,代码行数:7,代码来源:test_projects.py

示例2: test_issues_stats

 def test_issues_stats(self, mock_requestmaker_get):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.issues_stats()
     mock_requestmaker_get.assert_called_with(
         '/{endpoint}/{id}/issues_stats',
         endpoint='projects', id=1
     )
开发者ID:BabisK,项目名称:python-taiga,代码行数:8,代码来源:test_projects.py

示例3: test_get_userstories_by_ref

 def test_get_userstories_by_ref(self, mock_requestmaker_get):
     mock_requestmaker_get.return_value = MockResponse(200,
         create_mock_json('tests/resources/userstory_details_success.json'))
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     api = TaigaAPI(token='f4k3')
     us = project.get_userstory_by_ref(1)
     self.assertEqual(us.description, "Description of the story")
开发者ID:BabisK,项目名称:python-taiga,代码行数:8,代码来源:test_projects.py

示例4: test_get_issues_by_ref

 def test_get_issues_by_ref(self, mock_requestmaker_get):
     mock_requestmaker_get.return_value = MockResponse(200,
         create_mock_json('tests/resources/issue_details_success.json'))
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     api = TaigaAPI(token='f4k3')
     issue = project.get_issue_by_ref(31)
     self.assertEqual(issue.description, "Implement API CALL")
开发者ID:BabisK,项目名称:python-taiga,代码行数:8,代码来源:test_projects.py

示例5: test_unstar

 def test_unstar(self, mock_requestmaker_post):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     self.assertEqual(project.unstar().id, 1)
     mock_requestmaker_post.assert_called_with(
         '/{endpoint}/{id}/unstar',
         endpoint='projects', id=1
     )
开发者ID:BabisK,项目名称:python-taiga,代码行数:8,代码来源:test_projects.py

示例6: test_import_issue

 def test_import_issue(self, mock_import_issue):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.import_issue('Issue 1', 1, 2, 3, 4)
     mock_import_issue.assert_called_with(1, 'Issue 1', 1, 2, 3, 4)
开发者ID:BabisK,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例7: test_stats

 def test_stats(self, mock_requestmaker_get):
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     project = Project(rm, id=1)
     project.stats()
     mock_requestmaker_get.assert_called_with("/{endpoint}/{id}/stats", endpoint="projects", id=1)
开发者ID:jespino,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例8: test_list_membership

 def test_list_membership(self, mock_list_memberships):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.list_memberships()
     mock_list_memberships.assert_called_with(project=1)
开发者ID:BabisK,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例9: test_list_user_story_attributes

 def test_list_user_story_attributes(self, mock_list_us_attr):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.list_user_story_attributes()
     mock_list_us_attr.assert_called_with(project=1)
开发者ID:BabisK,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例10: test_import_task

 def test_import_task(self, mock_import_task):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.import_task('Task 1', 'New')
     mock_import_task.assert_called_with(1, 'Task 1', 'New')
开发者ID:BabisK,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例11: test_import_wikipage

 def test_import_wikipage(self, mock_import_wikipage):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.import_wikipage('Slug 1', 'Content')
     mock_import_wikipage.assert_called_with(1, 'Slug 1', 'Content')
开发者ID:BabisK,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例12: test_add_priority

 def test_add_priority(self, mock_new_priority):
     rm = RequestMaker('/api/v1', 'fakehost', 'faketoken')
     project = Project(rm, id=1)
     project.add_priority('Priority 1')
     mock_new_priority.assert_called_with(1, 'Priority 1')
开发者ID:BabisK,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例13: test_list_priorities

 def test_list_priorities(self, mock_list_priorities):
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     project = Project(rm, id=1)
     project.list_priorities()
     mock_list_priorities.assert_called_with(project=1)
开发者ID:jespino,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例14: test_add_issue_status

 def test_add_issue_status(self, mock_new_issue_status):
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     project = Project(rm, id=1)
     project.add_issue_status("Issue 1")
     mock_new_issue_status.assert_called_with(1, "Issue 1")
开发者ID:jespino,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py

示例15: test_unstar

 def test_unstar(self, mock_requestmaker_post):
     rm = RequestMaker("/api/v1", "fakehost", "faketoken")
     project = Project(rm, id=1)
     self.assertEqual(project.unstar().id, 1)
     mock_requestmaker_post.assert_called_with("/{endpoint}/{id}/unstar", endpoint="projects", id=1)
开发者ID:jespino,项目名称:python-taiga,代码行数:5,代码来源:test_projects.py


注:本文中的taiga.models.Project类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。