def test_issue_update(self, get_issue): allow(config.Config).auth expect(requests).put.and_return(support.MockResponse(204)) runner = CliRunner() result = runner.invoke( cli.cli, ['issue', 'DEV-101', 'update', 'reporter.name', 'james']) assert result.exit_code == 0 assert result.output == u'\x1b(0lqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwqqqqqqqqqqqqk\x1b(B\n\x1b(0x\x1b(B assignee_display_name \x1b(0x\x1b(B description \x1b(0x\x1b(B reporter_display_name \x1b(0x\x1b(B status_status_category_name \x1b(0x\x1b(B summary \x1b(0x\x1b(B\n\x1b(0tqqqqqqqqqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqqqqqqqqqnqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnqqqqqqqqqqqqu\x1b(B\n\x1b(0x\x1b(B Jack Shepard \x1b(0x\x1b(B example bug report \x1b(0x\x1b(B John Locke \x1b(0x\x1b(B In Progress \x1b(0x\x1b(B Bug report \x1b(0x\x1b(B\n\x1b(0mqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqqqqqqqqqqqqqqqqqqvqqqqqqqqqqqqj\x1b(B\n'
def test_issue_no_transitions(self): response = support.MockResponse(200) response.data = {} allow(requests).get.and_return(response) runner = CliRunner() result = runner.invoke(cli.cli, ['issue', 'DEV-101', 'transitions']) assert result.exit_code == 0 assert result.output == 'No transitions found for DEV-101\n'
def test_do_transition(self): transition = support.MockResponse(204) transition.data = float('-inf') allow(requests).post.and_return(transition) runner = CliRunner() result = runner.invoke(cli.cli, ['issue', 'DEV-101', 'dotransition', str(1)]) assert result.exit_code == 0 assert result.output == 'Successfully transitioned DEV-101\n'
def test_do_transition(mock_object): mock_object.return_value = support.MockResponse(204) runner = CliRunner() result = runner.invoke(cli.issue, ['DEV-101', 'dotransition', str(1)]) assert result.exit_code == 0 assert result.output == 'Successfully transitioned DEV-101\n'