Пример #1
0
    def test_start(self, create_branch, args, engine):
        args.action = "start"
        args.labels = False
        args.create_branch = create_branch

        handle_issue_call(args, engine)

        engine.assert_has_calls([mock.call.open_issue(title=args.title, labels=None, create_branch=args.create_branch)])
Пример #2
0
    def test_start_with_labels(self, create_branch, id_generator, args, engine):
        args.action = "start"
        args.labels = ",".join((id_generator() for x in range(5)))
        args.create_branch = create_branch

        handle_issue_call(args, engine)

        engine.assert_has_calls(
            [mock.call.open_issue(title=args.title, labels=args.labels.split(","), create_branch=args.create_branch)]
        )