本文整理汇总了Python中taiga_ncurses.ui.signals.emit函数的典型用法代码示例。如果您正苦于以下问题:Python emit函数的具体用法?Python emit怎么用?Python emit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了emit函数的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_when_clicking_login_button_controllers_handle_login_method_is_called
def test_when_clicking_login_button_controllers_handle_login_method_is_called():
login_view = factories.login_view("", "")
_ = mock.Mock()
login_controller = controllers.auth.LoginController(login_view, _, _)
login_controller.handle_login_request = mock.Mock()
signals.emit(login_view.login_button, "click")
assert login_controller.handle_login_request.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:7,代码来源:test_project_controller.py
示例5: test_projects_controller_click_on_project_requests_the_project_detail
def test_projects_controller_click_on_project_requests_the_project_detail():
projects = factories.projects()
projects_view = views.projects.ProjectsView()
executor = factories.patched_executor()
_ = mock.Mock()
projects_controller = controllers.projects.ProjectsController(projects_view, executor, _)
signals.emit(projects_view.project_buttons[0], "click")
executor.project_detail.assert_called_with(projects[0])
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:10,代码来源:test_project_controller.py
示例6: test_login_controller_prints_an_error_message_on_unsuccessful_login
def test_login_controller_prints_an_error_message_on_unsuccessful_login():
login_view = factories.login_view("admin", "123123")
login_view.notifier = mock.Mock()
executor = factories.patched_executor(login_response=factories.future(None))
_ = mock.Mock()
login_controller = controllers.auth.LoginController(login_view, executor, _)
signals.emit(login_view.login_button, "click")
assert login_view.notifier.error_msg.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:10,代码来源:test_project_controller.py
示例7: test_projects_controller_when_requesting_a_project_info_message_is_shown
def test_projects_controller_when_requesting_a_project_info_message_is_shown():
projects = factories.projects()
projects_view = views.projects.ProjectsView()
projects_view.notifier = mock.Mock()
executor = factories.patched_executor()
_ = mock.Mock()
projects_controller = controllers.projects.ProjectsController(projects_view, executor, _)
signals.emit(projects_view.project_buttons[0], "click")
assert projects_view.notifier.info_msg.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_project_controller.py
示例8: test_projects_controller_click_on_project_when_project_is_fetched_transitions_to_project_detail
def test_projects_controller_click_on_project_when_project_is_fetched_transitions_to_project_detail():
projects = factories.projects()
fetched_project = projects[0]
projects_view = views.projects.ProjectsView()
executor = factories.patched_executor(project_detail=factories.future(fetched_project))
state_machine = mock.Mock()
projects_controller = controllers.projects.ProjectsController(projects_view, executor, state_machine)
signals.emit(projects_view.project_buttons[0], "click")
state_machine.project_detail.assert_called_with(fetched_project)
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:11,代码来源:test_project_controller.py
示例9: test_backlog_controller_cancel_the_new_user_story_form
def test_backlog_controller_cancel_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, _)
project_detail_controller.handle(settings.data.backlog.keys.create)
assert hasattr(project_detail_controller.view.backlog, "user_story_form")
form = project_detail_controller.view.backlog.user_story_form
signals.emit(form.cancel_button, "click")
assert not hasattr(project_detail_controller.view.backlog, "user_story_form")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例10: test_backlog_controller_close_the_milestone_selector_popup
def test_backlog_controller_close_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, _)
project_detail_controller.handle(settings.data.backlog.keys.move_to_milestone)
assert hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
milestone_selector_popup = project_detail_controller.view.backlog.milestone_selector_popup
signals.emit(milestone_selector_popup.cancel_button, "click")
assert not hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例11: test_backlog_controller_submit_new_user_stories_in_bulk_form_with_errors
def test_backlog_controller_submit_new_user_stories_in_bulk_form_with_errors():
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_detail_controller.handle(config.ProjectBacklogKeys.CREATE_USER_STORIES_IN_BULK)
form = project_detail_controller.view.backlog.user_stories_in_bulk_form
signals.emit(form.save_button, "click")
assert project_view.backlog.notifier.error_msg.call_count == 1
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例12: test_backlog_controller_cancel_the_new_user_stories_in_bulk_form
def test_backlog_controller_cancel_the_new_user_stories_in_bulk_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.ProjectBacklogKeys.CREATE_USER_STORIES_IN_BULK)
assert hasattr(project_detail_controller.view.backlog, "user_stories_in_bulk_form")
form = project_detail_controller.view.backlog.user_stories_in_bulk_form
signals.emit(form.cancel_button, "click")
assert not hasattr(project_detail_controller.view.backlog, "user_stories_in_bulk_form")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例13: test_backlog_controller_close_the_milestone_selector_popup
def test_backlog_controller_close_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, _)
project_detail_controller.handle(config.ProjectBacklogKeys.MOVE_US_TO_MILESTONE)
assert hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
milestone_selector_popup = project_detail_controller.view.backlog.milestone_selector_popup
signals.emit(milestone_selector_popup.cancel_button, "click")
assert not hasattr(project_detail_controller.view.backlog, "milestone_selector_popup")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例14: test_backlog_controller_close_the_help_popup
def test_backlog_controller_close_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.ProjectBacklogKeys.HELP)
assert hasattr(project_detail_controller.view.backlog, "help_popup")
help_popup = project_detail_controller.view.backlog.help_popup
signals.emit(help_popup.close_button, "click")
assert not hasattr(project_detail_controller.view.backlog, "help_popup")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例15: test_backlog_controller_submit_new_user_story_form_with_errors
def test_backlog_controller_submit_new_user_story_form_with_errors():
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_detail_controller.handle(settings.data.backlog.keys.create)
form = project_detail_controller.view.backlog.user_story_form
signals.emit(form.save_button, "click")
assert project_view.backlog.notifier.error_msg.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:12,代码来源:test_backlog_controller.py
示例16: test_projects_controller_when_project_fetching_fails_a_error_message_is_shown
def test_projects_controller_when_project_fetching_fails_a_error_message_is_shown():
projects = factories.projects()
fetched_project = projects[0]
projects_view = views.projects.ProjectsView()
projects_view.notifier = mock.Mock()
executor = factories.patched_executor(project_detail=factories.future(None))
_ = mock.Mock()
projects_controller = controllers.projects.ProjectsController(projects_view, executor, _)
signals.emit(projects_view.project_buttons[0], "click")
assert projects_view.notifier.error_msg.call_count == 1
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:12,代码来源:test_project_controller.py
示例17: test_sprints_controller_close_the_help_popup
def test_sprints_controller_close_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)
project_detail_controller.handle(settings.data.milestone.keys.help)
assert hasattr(project_detail_controller.view.sprint, "help_popup")
help_popup = project_detail_controller.view.sprint.help_popup
signals.emit(help_popup.close_button, "click")
assert not hasattr(project_detail_controller.view.sprint, "help_popup")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:13,代码来源:test_milestones_controller.py
示例18: test_sprint_controller_cancel_the_edit_user_story_form
def test_sprint_controller_cancel_the_edit_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, _)
project_detail_controller.handle(settings.data.main.keys.milestone)
project_detail_controller.handle(settings.data.milestone.keys.edit)
assert hasattr(project_detail_controller.sprint.view, "user_story_form")
form = project_detail_controller.sprint.view.user_story_form
signals.emit(form.cancel_button, "click")
assert not hasattr(project_detail_controller.sprint.view, "user_story_form")
开发者ID:AVert,项目名称:taiga-ncurses,代码行数:13,代码来源:test_milestones_controller.py
示例19: test_sprint_controller_cancel_the_new_user_story_form
def test_sprint_controller_cancel_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, _)
project_detail_controller.handle(config.ProjectKeys.MILESTONES)
project_detail_controller.handle(config.ProjectMilestoneKeys.CREATE_USER_STORY)
assert hasattr(project_detail_controller.sprint.view, "user_story_form")
form = project_detail_controller.sprint.view.user_story_form
signals.emit(form.cancel_button, "click")
assert not hasattr(project_detail_controller.sprint.view, "user_story_form")
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:13,代码来源:test_milestones_controller.py
示例20: test_backlog_controller_submit_the_edit_user_story_form_with_errors
def test_backlog_controller_submit_the_edit_user_story_form_with_errors():
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_detail_controller.handle(config.ProjectBacklogKeys.EDIT_USER_STORY)
form = project_detail_controller.view.backlog.user_story_form
form._subject_edit.set_edit_text("")
signals.emit(form.save_button, "click")
assert project_view.backlog.notifier.error_msg.call_count == 1
开发者ID:joseph-hurtado,项目名称:taiga-ncurses,代码行数:13,代码来源:test_backlog_controller.py
注:本文中的taiga_ncurses.ui.signals.emit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论