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
=== modified file 'tests/autopilot/calendar_app/data.py'
--- tests/autopilot/calendar_app/data.py 2014-07-30 21:45:13 +0000
+++ tests/autopilot/calendar_app/data.py 2015-06-01 13:17:20 +0000
@@ -50,10 +50,10 @@
50 def make_unique(cls, unique_id=None):50 def make_unique(cls, unique_id=None):
51 """Return a unique event."""51 """Return a unique event."""
52 if unique_id is None:52 if unique_id is None:
53 unique_id = str(uuid.uuid1())53 unique_id = str(uuid.uuid4())[:8]
54 calendar = 'Personal'54 calendar = 'Personal'
55 name = 'Test event {}'.format(unique_id)55 name = 'Test ev {}'.format(unique_id)
56 description = 'Test description {}.'.format(unique_id)56 description = 'Test desc {}.'.format(unique_id)
57 location = 'Test location {}'.format(unique_id)57 location = 'Test loc {}'.format(unique_id)
58 guests = ['UX User']58 guests = ['UX User']
59 return cls(calendar, name, description, location, guests)59 return cls(calendar, name, description, location, guests)
6060
=== modified file 'tests/autopilot/calendar_app/tests/test_data.py'
--- tests/autopilot/calendar_app/tests/test_data.py 2014-07-31 15:59:26 +0000
+++ tests/autopilot/calendar_app/tests/test_data.py 2015-06-01 13:17:20 +0000
@@ -25,7 +25,7 @@
25 event = data.Event.make_unique(unique_id='test uuid')25 event = data.Event.make_unique(unique_id='test uuid')
2626
27 self.assertEqual(event.calendar, 'Personal')27 self.assertEqual(event.calendar, 'Personal')
28 self.assertEqual(event.name, 'Test event test uuid')28 self.assertEqual(event.name, 'Test ev test uuid')
29 self.assertEqual(event.description, 'Test description test uuid.')29 self.assertEqual(event.description, 'Test desc test uuid.')
30 self.assertEqual(event.location, 'Test location test uuid')30 self.assertEqual(event.location, 'Test loc test uuid')
31 self.assertEqual(event.guests, ['UX User'])31 self.assertEqual(event.guests, ['UX User'])

Subscribers

People subscribed via source and target branches

to status/vote changes: