Merge lp:~cjohnston/ubuntu-ci-services-itself/time-1283008 into lp:ubuntu-ci-services-itself

Proposed by Chris Johnston
Status: Merged
Approved by: Chris Johnston
Approved revision: 258
Merged at revision: 259
Proposed branch: lp:~cjohnston/ubuntu-ci-services-itself/time-1283008
Merge into: lp:ubuntu-ci-services-itself
Diff against target: 162 lines (+18/-14)
3 files modified
ticket_system/ticket/tests/test_full_read_api.py (+3/-2)
ticket_system/ticket/tests/test_read_api.py (+13/-12)
ticket_system/ticket_system/settings.py (+2/-0)
To merge this branch: bzr merge lp:~cjohnston/ubuntu-ci-services-itself/time-1283008
Reviewer Review Type Date Requested Status
Chris Johnston (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Evan (community) Approve
Review via email: mp+207654@code.launchpad.net

Commit message

Changes the ticket times to be more human readable

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Big +1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

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

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

review: Approve (continuous-integration)
Revision history for this message
Chris Johnston (cjohnston) wrote :

 merge approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ticket_system/ticket/tests/test_full_read_api.py'
2--- ticket_system/ticket/tests/test_full_read_api.py 2014-02-19 16:34:46 +0000
3+++ ticket_system/ticket/tests/test_full_read_api.py 2014-02-21 14:58:39 +0000
4@@ -20,6 +20,7 @@
5 from ticket.models import (get_enum_title, SubTicketWorkflowStep,
6 SubTicketWorkflowStepStatus, TicketWorkflowStep,
7 TicketWorkflowStepStatus)
8+from django.conf import settings
9
10 sourcepackage_recipe = Recipe(SourcePackage, name=seq('foobar'))
11
12@@ -85,7 +86,7 @@
13 self.subticket.pk)}],
14 u'bug_id': self.ticket.bug_id,
15 u'created': unicode(self.ticket.created.strftime(
16- "%Y-%m-%dT%H:%M:%S.%f")),
17+ settings.TEST_DATETIME_FORMAT)),
18 u'owner': unicode(self.ticket.owner),
19 u'base_image': unicode(self.ticket.base_image),
20 u'id': self.ticket.pk,
21@@ -93,7 +94,7 @@
22 u'resource_uri': u'/api/v1/fullticket/{0}/'.format(self.ticket.pk),
23 u'series': unicode(self.ticket.series),
24 u'updated': unicode(self.ticket.updated.strftime(
25- "%Y-%m-%dT%H:%M:%S.%f")),
26+ settings.TEST_DATETIME_FORMAT)),
27 u'removed_binaries': self.ticket.removed_binaries,
28 })
29
30
31=== modified file 'ticket_system/ticket/tests/test_read_api.py'
32--- ticket_system/ticket/tests/test_read_api.py 2014-02-19 16:34:46 +0000
33+++ ticket_system/ticket/tests/test_read_api.py 2014-02-21 14:58:39 +0000
34@@ -20,6 +20,7 @@
35 from ticket.models import (get_enum_title, SubTicketWorkflowStep,
36 SubTicketWorkflowStepStatus, TicketWorkflowStep,
37 TicketWorkflowStepStatus)
38+from django.conf import settings
39
40 sourcepackage_recipe = Recipe(SourcePackage, name=seq('foobar'))
41
42@@ -66,7 +67,7 @@
43 u'status': unicode(get_enum_title(self.ticket.status,
44 TicketWorkflowStepStatus)),
45 u'created': unicode(self.ticket.created.strftime(
46- "%Y-%m-%dT%H:%M:%S.%f")),
47+ settings.TEST_DATETIME_FORMAT)),
48 u'current_workflow_step': unicode(get_enum_title(
49 self.ticket.current_workflow_step,
50 TicketWorkflowStep)),
51@@ -82,7 +83,7 @@
52 self.ticket.pk),
53 u'series': unicode(self.ticket.series),
54 u'updated': unicode(self.ticket.updated.strftime(
55- "%Y-%m-%dT%H:%M:%S.%f"))},
56+ settings.TEST_DATETIME_FORMAT))},
57 u'id': self.subticket.pk,
58 u'resource_uri': u'/api/v1/subticket/{0}/'.format(
59 self.subticket.pk)},
60@@ -102,7 +103,7 @@
61 u'status': unicode(get_enum_title(self.ticket.status,
62 TicketWorkflowStepStatus)),
63 u'created': unicode(self.ticket.created.strftime(
64- "%Y-%m-%dT%H:%M:%S.%f")),
65+ settings.TEST_DATETIME_FORMAT)),
66 u'current_workflow_step': unicode(get_enum_title(
67 self.ticket.current_workflow_step,
68 TicketWorkflowStep)),
69@@ -118,7 +119,7 @@
70 self.ticket.pk),
71 u'series': unicode(self.ticket.series),
72 u'updated': unicode(self.ticket.updated.strftime(
73- "%Y-%m-%dT%H:%M:%S.%f"))},
74+ settings.TEST_DATETIME_FORMAT))},
75 u'type': unicode(self.artifact_2.type),
76 u'id': self.artifact_2.pk,
77 u'resource_uri': u'/api/v1/ticketartifact/{0}/'.format(
78@@ -152,7 +153,7 @@
79 u'base_image': unicode(self.ticket.base_image),
80 u'bug_id': self.ticket.bug_id,
81 u'created': unicode(self.ticket.created.strftime(
82- "%Y-%m-%dT%H:%M:%S.%f")),
83+ settings.TEST_DATETIME_FORMAT)),
84 u'current_workflow_step': unicode(get_enum_title(
85 self.ticket.current_workflow_step,
86 TicketWorkflowStep)),
87@@ -168,7 +169,7 @@
88 self.ticket.pk),
89 u'series': unicode(self.ticket.series),
90 u'updated': unicode(self.ticket.updated.strftime(
91- "%Y-%m-%dT%H:%M:%S.%f"))},
92+ settings.TEST_DATETIME_FORMAT))},
93 })
94
95 def test_get_ticket_api(self):
96@@ -178,7 +179,7 @@
97 u'status': unicode(get_enum_title(self.ticket.status,
98 TicketWorkflowStepStatus)),
99 u'created': unicode(self.ticket.created.strftime(
100- "%Y-%m-%dT%H:%M:%S.%f")),
101+ settings.TEST_DATETIME_FORMAT)),
102 u'current_workflow_step': unicode(get_enum_title(
103 self.ticket.current_workflow_step,
104 TicketWorkflowStep)),
105@@ -194,7 +195,7 @@
106 self.ticket.pk),
107 u'series': unicode(self.ticket.series),
108 u'updated': unicode(self.ticket.updated.strftime(
109- "%Y-%m-%dT%H:%M:%S.%f")),
110+ settings.TEST_DATETIME_FORMAT)),
111 })
112
113 def test_get_sourcepackageupload_api(self):
114@@ -242,7 +243,7 @@
115 obj = self.getResource('ticketstatus/')
116 self.assertEqual(obj['objects'][0], {
117 u'created': unicode(self.ticket.created.strftime(
118- "%Y-%m-%dT%H:%M:%S.%f")),
119+ settings.TEST_DATETIME_FORMAT)),
120 u'current_workflow_step': unicode(get_enum_title(
121 self.ticket.current_workflow_step,
122 TicketWorkflowStep)),
123@@ -253,7 +254,7 @@
124 u'resource_uri':
125 u'/api/v1/ticketstatus/{0}/'.format(self.ticket.pk),
126 u'updated': unicode(self.ticket.updated.strftime(
127- "%Y-%m-%dT%H:%M:%S.%f")),
128+ settings.TEST_DATETIME_FORMAT)),
129 })
130
131 def test_get_subticket_update_status_api(self):
132@@ -377,7 +378,7 @@
133 u'status': unicode(get_enum_title(self.ticket_6.status,
134 TicketWorkflowStepStatus)),
135 u'created': unicode(self.ticket_6.created.strftime(
136- "%Y-%m-%dT%H:%M:%S.%f")),
137+ settings.TEST_DATETIME_FORMAT)),
138 u'current_workflow_step': unicode(get_enum_title(
139 self.ticket_6.current_workflow_step,
140 TicketWorkflowStep)),
141@@ -393,7 +394,7 @@
142 self.ticket_6.pk),
143 u'series': unicode(self.ticket_6.series),
144 u'updated': unicode(self.ticket_6.updated.strftime(
145- "%Y-%m-%dT%H:%M:%S.%f")),
146+ settings.TEST_DATETIME_FORMAT)),
147 })
148
149 def test_no_open_tickets(self):
150
151=== modified file 'ticket_system/ticket_system/settings.py'
152--- ticket_system/ticket_system/settings.py 2014-02-17 10:13:29 +0000
153+++ ticket_system/ticket_system/settings.py 2014-02-21 14:58:39 +0000
154@@ -68,6 +68,8 @@
155 # although not all choices may be available on all operating systems.
156 # In a Windows environment this must be set to your system time zone.
157 TIME_ZONE = 'GMT'
158+TASTYPIE_DATETIME_FORMATTING = 'rfc-2822'
159+TEST_DATETIME_FORMAT = "%a, %d %b %Y %H:%M:%S %z"
160
161 # Language code for this installation. All choices can be found here:
162 # http://www.i18nguy.com/unicode/language-identifiers.html

Subscribers

People subscribed via source and target branches