本文整理汇总了Python中tests.factories.project函数的典型用法代码示例。如果您正苦于以下问题:Python project函数的具体用法?Python project怎么用?Python project使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了project函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: test_sprint_controller_submit_edit_task_form_successfully
def test_sprint_controller_submit_edit_task_form_successfully():
task_subject = "Update a task"
task_user_story = 12
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
project_view.sprint.notifier = mock.Mock()
executor = factories.patched_executor(update_task_response=factories.future(
factories.successful_update_task_response(task_subject, task_user_story)))
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(settings.data.main.keys.milestone)
project_detail_controller.sprint.view.taskboard.widget.set_focus(1)
project_detail_controller.handle(settings.data.milestone.keys.edit)
form = project_detail_controller.sprint.view.task_form
project_view.sprint.notifier.reset_mock()
form._subject_edit.set_edit_text(task_subject)
form._user_story_combo.get_selected().value = task_user_story
signals.emit(form.save_button, "click")
assert project_view.sprint.notifier.info_msg.call_count == 1
assert (executor.update_task.call_args.call_list()[0][0][0]["id"] == form.task["id"])
assert executor.update_task.call_args.call_list()[0][0][1]["subject"] == task_subject
assert (executor.update_task.call_args.call_list()[0][0][1]["milestone"] ==
project_detail_controller.sprint.view._milestone["id"])
assert executor.update_task.call_args.call_list()[0][0][1]["user_story"] == task_user_story
assert executor.update_task.call_count == 1
assert executor.update_task.return_value.result()["subject"] == task_subject
assert (executor.update_task.return_value.result()["milestone"] ==
project_detail_controller.sprint.view._milestone["id"])
assert executor.update_task.return_value.result()["user_story"] == task_user_story
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:31,代码来源:test_milestones_controller.py
示例2: test_issues_controller_submit_the_filters_popup
def test_issues_controller_submit_the_filters_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
project_view.issues.notifier = mock.Mock()
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(config.ProjectKeys.ISSUES)
project_detail_controller.handle(config.ProjectIssuesKeys.FILTERS)
filters_popup = project_detail_controller.view.issues.filters_popup
project_view.issues.notifier.reset_mock()
executor.issues.reset_mock()
assert project_view.issues.notifier.info_msg.call_count == 0
assert executor.issues.call_count == 0
filters_popup._issue_types_group[0].set_state(True)
filters_popup._issue_statuses_group[0].set_state(True)
filters_popup._priorities_group[0].set_state(True)
filters_popup._severities_group[0].set_state(True)
filters_popup._assigned_to_group[0].set_state(True)
filters_popup._created_by_group[0].set_state(True)
#filters_popup._tags_group[0].set_state(True)
signals.emit(filters_popup.filter_button, "click")
assert project_view.issues.notifier.info_msg.call_count == 1
assert executor.issues.call_count == 1
assert len(filters_popup._filters) == 7
assert len(executor.issues.call_args.call_list()[0][1]["filters"]["type"]) == 1
assert len(executor.issues.call_args.call_list()[0][1]["filters"]["status"]) == 1
assert len(executor.issues.call_args.call_list()[0][1]["filters"]["severity"]) == 1
assert len(executor.issues.call_args.call_list()[0][1]["filters"]["priority"]) == 1
assert len(executor.issues.call_args.call_list()[0][1]["filters"]["assigned_to"]) == 1
assert len(executor.issues.call_args.call_list()[0][1]["filters"]["owner"]) == 1
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:32,代码来源:test_issues_controller.py
示例3: test_sprint_controller_change_to_another_milestone
def test_sprint_controller_change_to_another_milestone():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
project_view.sprint.notifier = mock.Mock()
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(settings.data.main.keys.milestone)
project_detail_controller.handle(settings.data.milestone.keys.change_to_milestone)
milestone_selector_popup = project_detail_controller.view.sprint.milestone_selector_popup
project_view.sprint.notifier.reset_mock()
executor.milestone.reset_mock()
executor.milestone_stats.reset_mock()
executor.user_stories.reset_mock()
executor.tasks.reset_mock()
assert project_view.sprint.notifier.info_msg.call_count == 0
assert executor.milestone.call_count == 0
assert executor.milestone_stats.call_count == 0
assert executor.user_stories.call_count == 0
assert executor.tasks.call_count == 0
signals.emit(milestone_selector_popup.options[2], "click")
assert project_view.sprint.notifier.info_msg.call_count == 1
assert executor.milestone.call_count == 1
assert executor.milestone_stats.call_count == 1
assert executor.user_stories.call_count == 1
assert executor.tasks.call_count == 1
assert (project_detail_controller.sprint.view._milestone["id"] ==
milestone_selector_popup.project["list_of_milestones"][-1]["id"])
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:29,代码来源:test_milestones_controller.py
示例4: test_project_detail_controller_fetches_user_stories_and_transitions_to_backlog
def test_project_detail_controller_fetches_user_stories_and_transitions_to_backlog():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
state_machine = StateMachine(mock.Mock(), StateMachine.PROJECTS)
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor,
state_machine)
assert state_machine.state == state_machine.PROJECT_BACKLOG
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:9,代码来源:test_project_controller.py
示例5: test_backlog_controller_show_the_milestone_selector_popup
def test_backlog_controller_show_the_milestone_selector_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
assert not hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
project_detail_controller.handle(config.ProjectBacklogKeys.MOVE_US_TO_MILESTONE)
assert hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例6: test_backlog_controller_update_user_stories_order_with_errors
def test_backlog_controller_update_user_stories_order_with_errors():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
project_view.backlog.notifier = mock.Mock()
executor = factories.patched_executor(update_user_stories_order_response=factories.future(None))
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(config.ProjectBacklogKeys.UPDATE_USER_STORIES_ORDER)
assert project_view.backlog.notifier.error_msg.call_count == 1
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例7: test_backlog_controller_show_the_new_user_story_form
def test_backlog_controller_show_the_new_user_story_form():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
assert not hasattr(project_detail_controller.view.backlog, "user_story_form")
project_detail_controller.handle(config.ProjectBacklogKeys.CREATE_USER_STORY)
assert hasattr(project_detail_controller.view.backlog, "user_story_form")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例8: test_backlog_controller_show_the_milestone_selector_popup
def test_backlog_controller_show_the_milestone_selector_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
assert not hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
project_detail_controller.handle(settings.data.backlog.keys.move_to_milestone)
assert hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例9: test_backlog_controller_update_user_stories_order_with_errors
def test_backlog_controller_update_user_stories_order_with_errors():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
project_view.backlog.notifier = mock.Mock()
executor = factories.patched_executor(update_user_stories_order_response=factories.future(None))
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(settings.data.backlog.keys.update_order)
assert project_view.backlog.notifier.error_msg.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例10: test_backlog_controller_show_the_new_user_story_form
def test_backlog_controller_show_the_new_user_story_form():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
assert not hasattr(project_detail_controller.view.backlog, "user_story_form")
project_detail_controller.handle(settings.data.backlog.keys.create)
assert hasattr(project_detail_controller.view.backlog, "user_story_form")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例11: test_backlog_controller_show_the_help_popup
def test_backlog_controller_show_the_help_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
assert not hasattr(project_detail_controller.view.backlog, "help_popup")
project_detail_controller.handle(config.ProjectBacklogKeys.HELP)
assert hasattr(project_detail_controller.view.backlog, "help_popup")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:10,代码来源:test_backlog_controller.py
示例12: test_backlog_controller_update_user_stories_order_with_success
def test_backlog_controller_update_user_stories_order_with_success():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
project_view.backlog.notifier = mock.Mock()
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_view.backlog.notifier.reset_mock()
project_detail_controller.handle(settings.data.backlog.keys.update_order)
assert project_view.backlog.notifier.info_msg.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_backlog_controller.py
示例13: test_project_detail_controller_fetches_issues_and_transitions_to_issues
def test_project_detail_controller_fetches_issues_and_transitions_to_issues():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
state_machine = StateMachine(mock.Mock(), StateMachine.PROJECTS)
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor,
state_machine)
assert state_machine.state == state_machine.PROJECT_BACKLOG
project_detail_controller.handle(config.ProjectKeys.ISSUES)
assert state_machine.state == state_machine.PROJECT_ISSUES
开发者ID:jespino,项目名称:urwintranet,代码行数:11,代码来源:test_project_controller.py
示例14: test_issues_controller_show_the_filters_popup
def test_issues_controller_show_the_filters_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(settings.data.main.keys.issues)
assert not hasattr(project_detail_controller.view.issues, "filters_popup")
project_detail_controller.handle(settings.data.issues.keys.filters)
assert hasattr(project_detail_controller.view.issues, "filters_popup")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_issues_controller.py
示例15: test_issues_controller_show_the_new_issue_form
def test_issues_controller_show_the_new_issue_form():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(config.ProjectKeys.ISSUES)
assert not hasattr(project_detail_controller.view.issues, "issue_form")
project_detail_controller.handle(config.ProjectIssuesKeys.CREATE_ISSUE)
assert hasattr(project_detail_controller.view.issues, "issue_form")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:11,代码来源:test_issues_controller.py
示例16: test_sprints_controller_show_the_help_popup
def test_sprints_controller_show_the_help_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(settings.data.main.keys.milestone)
assert not hasattr(project_detail_controller.view.sprint, "help_popup")
project_detail_controller.handle(settings.data.milestone.keys.help)
assert hasattr(project_detail_controller.view.sprint, "help_popup")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_milestones_controller.py
示例17: test_project_detail_controller_fetches_wiki_pages_and_transitions_to_wiki
def test_project_detail_controller_fetches_wiki_pages_and_transitions_to_wiki():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
state_machine = StateMachine(mock.Mock(), StateMachine.PROJECTS)
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor,
state_machine)
assert state_machine.state == state_machine.PROJECT_BACKLOG
project_detail_controller.handle(settings.data.main.keys.wiki)
assert state_machine.state == state_machine.PROJECT_WIKI
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_project_controller.py
示例18: test_issues_controller_show_the_filters_popup
def test_issues_controller_show_the_filters_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(config.ProjectKeys.ISSUES)
assert not hasattr(project_detail_controller.view.issues, "filters_popup")
project_detail_controller.handle(config.ProjectIssuesKeys.FILTERS)
assert hasattr(project_detail_controller.view.issues, "filters_popup")
开发者ID:jespino,项目名称:urwintranet,代码行数:11,代码来源:test_issues_controller.py
示例19: test_sprints_controller_show_the_help_popup
def test_sprints_controller_show_the_help_popup():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
_ = mock.Mock()
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor, _)
project_detail_controller.handle(config.ProjectKeys.MILESTONES)
assert not hasattr(project_detail_controller.view.sprint, "help_popup")
project_detail_controller.handle(config.ProjectMilestoneKeys.HELP)
assert hasattr(project_detail_controller.view.sprint, "help_popup")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:11,代码来源:test_milestones_controller.py
示例20: test_project_detail_controller_fetches_task_and_transitions_to_sprint_taskboard
def test_project_detail_controller_fetches_task_and_transitions_to_sprint_taskboard():
project = factories.project()
project_view = views.projects.ProjectDetailView(project)
executor = factories.patched_executor()
state_machine = StateMachine(mock.Mock(), StateMachine.PROJECTS)
project_detail_controller = controllers.projects.ProjectDetailController(project_view, executor,
state_machine)
assert state_machine.state == state_machine.PROJECT_BACKLOG
project_detail_controller.handle(settings.data.main.keys.milestone)
assert state_machine.state == state_machine.PROJECT_MILESTONES
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_project_controller.py
注:本文中的tests.factories.project函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论