Merge lp:~nskaggs/autopilot/fix-state-verbiage into lp:autopilot

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Thomi Richards
Approved revision: 439
Merged at revision: 447
Proposed branch: lp:~nskaggs/autopilot/fix-state-verbiage
Merge into: lp:autopilot
Diff against target: 74 lines (+11/-11)
2 files modified
autopilot/introspection/dbus.py (+3/-3)
autopilot/tests/unit/test_exceptions.py (+8/-8)
To merge this branch: bzr merge lp:~nskaggs/autopilot/fix-state-verbiage
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+207543@code.launchpad.net

Commit message

Fix the veribage for statenotfound errors, fixes https://bugs.launchpad.net/autopilot/+bug/1269649

Description of the change

Fix the veribage for statenotfound errors

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
439. By Nicholas Skaggs

rebase to trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

LGTM - test failures are due to new trusty packages, and will be fixed in a separate MP.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'autopilot/introspection/dbus.py'
2--- autopilot/introspection/dbus.py 2013-11-07 21:27:55 +0000
3+++ autopilot/introspection/dbus.py 2014-02-25 22:20:40 +0000
4@@ -77,16 +77,16 @@
5
6 if class_name is None:
7 self._message = \
8- u"State not found with filters {}.".format(
9+ u"Object not found with properties {}.".format(
10 repr(filters)
11 )
12 elif not filters:
13- self._message = u"State not found for class '{}'.".format(
14+ self._message = u"Object not found with name '{}'.".format(
15 class_name
16 )
17 else:
18 self._message = \
19- u"State not found for class '{}' and filters {}.".format(
20+ u"Object not found with name '{}' and properties {}.".format(
21 class_name,
22 repr(filters)
23 )
24
25=== modified file 'autopilot/tests/unit/test_exceptions.py'
26--- autopilot/tests/unit/test_exceptions.py 2013-10-13 21:49:49 +0000
27+++ autopilot/tests/unit/test_exceptions.py 2014-02-25 22:20:40 +0000
28@@ -41,12 +41,12 @@
29 err = StateNotFoundError("MyClass")
30 self.assertThat(
31 str(err),
32- Equals("State not found for class 'MyClass'.")
33+ Equals("Object not found with name 'MyClass'.")
34 )
35 if not six.PY3:
36 self.assertThat(
37 unicode(err),
38- Equals(u"State not found for class 'MyClass'.")
39+ Equals(u"Object not found with name 'MyClass'.")
40 )
41
42 def test_can_be_constructed_with_filters_only(self):
43@@ -54,12 +54,12 @@
44 err = StateNotFoundError(foo="bar")
45 self.assertThat(
46 str(err),
47- Equals("State not found with filters {'foo': 'bar'}.")
48+ Equals("Object not found with properties {'foo': 'bar'}.")
49 )
50 if not six.PY3:
51 self.assertThat(
52 unicode(err),
53- Equals(u"State not found with filters {'foo': 'bar'}.")
54+ Equals(u"Object not found with properties {'foo': 'bar'}.")
55 )
56
57 def test_can_be_constructed_with_class_name_and_filters(self):
58@@ -67,12 +67,12 @@
59 err = StateNotFoundError('MyClass', foo="bar")
60 self.assertThat(
61 str(err),
62- Equals("State not found for class 'MyClass'"
63- " and filters {'foo': 'bar'}.")
64+ Equals("Object not found with name 'MyClass'"
65+ " and properties {'foo': 'bar'}.")
66 )
67 if not six.PY3:
68 self.assertThat(
69 unicode(err),
70- Equals(u"State not found for class 'MyClass'"
71- " and filters {'foo': 'bar'}.")
72+ Equals(u"Object not found with name 'MyClass'"
73+ " and properties {'foo': 'bar'}.")
74 )

Subscribers

People subscribed via source and target branches