Merge lp:~cprov/uci-engine/cli-update-fix into lp:uci-engine

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 771
Merged at revision: 772
Proposed branch: lp:~cprov/uci-engine/cli-update-fix
Merge into: lp:uci-engine
Diff against target: 36 lines (+4/-4)
2 files modified
cli/ci_cli/tests/test_ticket.py (+3/-3)
cli/ci_cli/ticket.py (+1/-1)
To merge this branch: bzr merge lp:~cprov/uci-engine/cli-update-fix
Reviewer Review Type Date Requested Status
Ursula Junque (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+233034@code.launchpad.net

Commit message

Fixing CLI 'update_ticket' action status check (comparing string representations, not enums).

Description of the change

Fixing CLI 'update_ticket' action status check (comparing string representations, not enums).

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:771
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1350/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/uci-engine-ci/1350/rebuild

review: Approve (continuous-integration)
Revision history for this message
Ursula Junque (ursinha) wrote :

The string returned will be one with the enum number, not the description (you probably already know that), and I agree it's better this way. Approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cli/ci_cli/tests/test_ticket.py'
2--- cli/ci_cli/tests/test_ticket.py 2014-08-13 13:13:21 +0000
3+++ cli/ci_cli/tests/test_ticket.py 2014-09-02 11:56:09 +0000
4@@ -435,7 +435,7 @@
5 def test_update_start(self, mocked_patch, mocked_get):
6 # A NEW ticket can be started using the CLI.
7 mocked_get.return_value = {
8- 'current_workflow_step': TicketWorkflowStep.NEW,
9+ 'current_workflow_step': str(TicketWorkflowStep.NEW),
10 }
11 args_list = [
12 'update_ticket',
13@@ -460,8 +460,8 @@
14 def test_update_can_only_start_new(self, mocked_patch, mocked_get):
15 # Only NEW tickets can be started.
16 mocked_get.return_value = {
17- 'current_workflow_step': TicketWorkflowStep.QUEUED,
18- 'status': TicketWorkflowStepStatus.QUEUED,
19+ 'current_workflow_step': str(TicketWorkflowStep.QUEUED),
20+ 'status': str(TicketWorkflowStepStatus.QUEUED),
21 }
22 args_list = [
23 'update_ticket',
24
25=== modified file 'cli/ci_cli/ticket.py'
26--- cli/ci_cli/ticket.py 2014-08-28 02:17:10 +0000
27+++ cli/ci_cli/ticket.py 2014-09-02 11:56:09 +0000
28@@ -392,7 +392,7 @@
29 # Validates updates against the remote ticket details.
30 full_ticket = self._get_ticket(full=True)
31 if args.start and full_ticket['current_workflow_step'] != (
32- TicketWorkflowStep.NEW):
33+ str(TicketWorkflowStep.NEW)):
34 user_status = '{} - {}'.format(
35 full_ticket['current_workflow_step'], full_ticket['status'])
36 raise QueueingTicketError(

Subscribers

People subscribed via source and target branches