Merge lp:~elopio/reminders-app/autopilot_namespace_breakage into lp:reminders-app

Proposed by Leo Arias
Status: Merged
Approved by: David Planella
Approved revision: 140
Merged at revision: 141
Proposed branch: lp:~elopio/reminders-app/autopilot_namespace_breakage
Merge into: lp:reminders-app
Diff against target: 30 lines (+11/-1)
1 file modified
tests/autopilot/reminders/__init__.py (+11/-1)
To merge this branch: bzr merge lp:~elopio/reminders-app/autopilot_namespace_breakage
Reviewer Review Type Date Requested Status
David Planella Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+219785@code.launchpad.net

Commit message

Workaround for the API breakage on autopilot 1.5 that moved get_classname_from_path to a private module.

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
David Planella (dpm) wrote :

LGTM and most importantly it now makes Jenkins happy, nice work!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/reminders/__init__.py'
2--- tests/autopilot/reminders/__init__.py 2014-04-04 17:49:32 +0000
3+++ tests/autopilot/reminders/__init__.py 2014-05-16 06:52:57 +0000
4@@ -19,7 +19,9 @@
5 """Reminders app tests and emulators - top level package."""
6
7 import logging
8+from distutils import version
9
10+import autopilot
11 from autopilot import logging as autopilot_logging
12 from autopilot.introspection import dbus
13 from ubuntuuitoolkit import emulators as toolkit_emulators
14@@ -65,7 +67,15 @@
15
16 @classmethod
17 def validate_dbus_object(cls, path, state):
18- name = dbus.get_classname_from_path(path)
19+ if (version.LooseVersion(autopilot.version) >=
20+ version.LooseVersion('1.5')):
21+ # TODO there's an autopilot branch that will put the function in a
22+ # public module. Update this once the branch is released.
23+ # --elopio - 2014-05-16
24+ from autopilot.introspection import _xpathselect
25+ name = _xpathselect.get_classname_from_path(path)
26+ else:
27+ name = dbus.get_classname_from_path(path)
28 if name == 'Dialog':
29 if 'noAccountDialog' == state['objectName'][1]:
30 return True

Subscribers

People subscribed via source and target branches