Merge lp:~popey/ubuntu-calendar-app/reduce-typing into lp:ubuntu-calendar-app

Status: Merged
Approved by: Alan Pope 🍺🐧🐱 πŸ¦„
Approved revision: 655
Merged at revision: 657
Proposed branch: lp:~popey/ubuntu-calendar-app/reduce-typing
Merge into: lp:ubuntu-calendar-app
Diff against target: 33 lines (+7/-7)
2 files modified
tests/autopilot/calendar_app/data.py (+4/-4)
tests/autopilot/calendar_app/tests/test_data.py (+3/-3)
To merge this branch: bzr merge lp:~popey/ubuntu-calendar-app/reduce-typing
Reviewer Review Type Date Requested Status
Nicholas Skaggs (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+260716@code.launchpad.net

Commit message

Shorten text to reduce test run duration.

Description of the change

The AP tests spend a fair amount of time typing in long UUIDs. Shorter (8 char) UUIDs are unique enough and reduce typing immensely. Given many tests type the same UUID in 3 times, we can save a good bunch of minutes on each test run by shortening the text.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

+1 for speed.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/calendar_app/data.py'
2--- tests/autopilot/calendar_app/data.py 2014-07-30 21:45:13 +0000
3+++ tests/autopilot/calendar_app/data.py 2015-06-01 13:17:20 +0000
4@@ -50,10 +50,10 @@
5 def make_unique(cls, unique_id=None):
6 """Return a unique event."""
7 if unique_id is None:
8- unique_id = str(uuid.uuid1())
9+ unique_id = str(uuid.uuid4())[:8]
10 calendar = 'Personal'
11- name = 'Test event {}'.format(unique_id)
12- description = 'Test description {}.'.format(unique_id)
13- location = 'Test location {}'.format(unique_id)
14+ name = 'Test ev {}'.format(unique_id)
15+ description = 'Test desc {}.'.format(unique_id)
16+ location = 'Test loc {}'.format(unique_id)
17 guests = ['UX User']
18 return cls(calendar, name, description, location, guests)
19
20=== modified file 'tests/autopilot/calendar_app/tests/test_data.py'
21--- tests/autopilot/calendar_app/tests/test_data.py 2014-07-31 15:59:26 +0000
22+++ tests/autopilot/calendar_app/tests/test_data.py 2015-06-01 13:17:20 +0000
23@@ -25,7 +25,7 @@
24 event = data.Event.make_unique(unique_id='test uuid')
25
26 self.assertEqual(event.calendar, 'Personal')
27- self.assertEqual(event.name, 'Test event test uuid')
28- self.assertEqual(event.description, 'Test description test uuid.')
29- self.assertEqual(event.location, 'Test location test uuid')
30+ self.assertEqual(event.name, 'Test ev test uuid')
31+ self.assertEqual(event.description, 'Test desc test uuid.')
32+ self.assertEqual(event.location, 'Test loc test uuid')
33 self.assertEqual(event.guests, ['UX User'])

Subscribers

People subscribed via source and target branches

to status/vote changes: