Merge lp:~popey/ubuntu-rssreader-app/fix-1317198 into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 231
Merged at revision: 231
Proposed branch: lp:~popey/ubuntu-rssreader-app/fix-1317198
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 177 lines (+42/-34)
1 file modified
tests/autopilot/shorts_app/tests/test_rssreader.py (+42/-34)
To merge this branch: bzr merge lp:~popey/ubuntu-rssreader-app/fix-1317198
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Shorts Developers Pending
Review via email: mp+220304@code.launchpad.net

Commit message

Fix pep8 issues.

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)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/shorts_app/tests/test_rssreader.py'
2--- tests/autopilot/shorts_app/tests/test_rssreader.py 2014-05-05 12:25:50 +0000
3+++ tests/autopilot/shorts_app/tests/test_rssreader.py 2014-05-20 16:03:19 +0000
4@@ -38,8 +38,9 @@
5 def setUp(self):
6 super(BaseShortsAppTestCase, self).setUp()
7
8- self.assertThat(self.shorts_app.main_view.visible, Eventually(Equals(True)))
9- #wait for any updates to finish before beginning tests
10+ self.assertThat(self.shorts_app.main_view.visible,
11+ Eventually(Equals(True)))
12+ # wait for any updates to finish before beginning tests
13 self._wait_for_refresh()
14
15 def _wait_for_refresh(self):
16@@ -85,46 +86,50 @@
17 self.assertThat(self.shorts_app.main_view.get_topics_page,
18 Eventually(NotEquals(None)))
19
20- #open toolbar
21+ # open toolbar
22 toolbar = self.shorts_app.main_view.open_toolbar()
23 self.assertThat(self.shorts_app.main_view.open_toolbar,
24 Eventually(NotEquals(None)))
25
26- #click on edit topics button
27+ # click on edit topics button
28 toolbar.click_button("edittopicsbutton")
29
30- #verify we are on the Management page
31+ # verify we are on the Management page
32 feedlistpage = self.shorts_app.main_view.get_feed_management_page()
33 self.assertThat(feedlistpage.visible, Eventually(Equals(True)))
34
35- #select topic
36+ # select topic
37 topic = self._get_topic(topicName)
38 topicLabel = topic.select_single("Label", text=topicName)
39
40- topicmanagementpage = self.shorts_app.main_view.get_feed_management_page()
41+ topicmanagementpage = \
42+ self.shorts_app.main_view.get_feed_management_page()
43 self.assertThat(self.shorts_app.main_view.get_feed_management_page,
44 Eventually(NotEquals(None)))
45
46- #swipe to delete topic
47+ # swipe to delete topic
48 startX = int(topicmanagementpage.x + topicmanagementpage.width * 0.30)
49 stopX = int(topicmanagementpage.x + topicmanagementpage.width)
50 lineY = topicLabel.globalRect[1]
51
52- #swipe to remove the topic
53+ # swipe to remove the topic
54 self.pointing_device.move(startX, lineY)
55 self.pointing_device.click()
56 self.pointing_device.drag(startX, lineY, stopX, lineY)
57
58- #verify we are on the Topic Management page **for timing issue
59- topicmanagementpage = self.shorts_app.main_view.get_feed_management_page()
60+ # verify we are on the Topic Management page **for timing issue
61+ topicmanagementpage = \
62+ self.shorts_app.main_view.get_feed_management_page()
63 self.assertThat(self.shorts_app.main_view.get_feed_management_page,
64 Eventually(NotEquals(None)))
65- self.assertThat(self.shorts_app.main_view.get_feed_management_page().visible,
66- Eventually(Equals(True)))
67- self.assertThat(self.shorts_app.main_view.get_feed_management_page().objectName,
68- Eventually(Equals("topicmanagement")))
69+ self.assertThat(
70+ self.shorts_app.main_view.get_feed_management_page().visible,
71+ Eventually(Equals(True)))
72+ self.assertThat(
73+ self.shorts_app.main_view.get_feed_management_page().objectName,
74+ Eventually(Equals("topicmanagement")))
75
76- #check topic has been removed
77+ # check topic has been removed
78 logger.debug("assert removed topic")
79 try:
80 self.assertThat(self._get_topic(topicName),
81@@ -141,9 +146,9 @@
82 return self._safe_enter_text(inputField, topic)
83
84 def _safe_enter_text(self, inputField, text, timeout=10):
85- #poll clicking for focus for lack of better method,
86- #due to screen switching animation
87- #is there a property we can use instead?
88+ # poll clicking for focus for lack of better method,
89+ # due to screen switching animation
90+ # is there a property we can use instead?
91 poll = 0
92 while not inputField.focus and poll < timeout:
93 self.pointing_device.click_object(inputField)
94@@ -156,8 +161,9 @@
95
96 def _get_topic(self, topicName, timeout=10):
97 logger.debug("_get_topic: assert topics")
98- self.assertThat(lambda: self.shorts_app.main_view.get_feedlist_topic(topicName),
99- Eventually(Not(Is([]))))
100+ self.assertThat(
101+ lambda: self.shorts_app.main_view.get_feedlist_topic(topicName),
102+ Eventually(Not(Is([]))))
103 logger.debug("_get_topic: grab topic")
104 topic = self.shorts_app.main_view.get_feedlist_topic(topicName)
105 logger.debug("_get_topic: click topic")
106@@ -177,10 +183,10 @@
107 test_topic = 'Test topic'
108 self.add_feed_to_new_topic(test_feed_url, test_feed_title, test_topic)
109
110- #remove added feed
111+ # remove added feed
112 logger.debug("starting remove feed")
113
114- #remove added topic
115+ # remove added topic
116 self._remove_topic(test_topic)
117
118 def test_switch_to_list_view_mode(self):
119@@ -231,46 +237,48 @@
120
121 self.add_feed_to_new_topic(test_feed_url, test_feed_title, test_topic)
122
123- #verify we are on the topicName Tab
124+ # verify we are on the topicName Tab
125 editTab = self.shorts_app.main_view.get_topic_tab(test_topic)
126 self.assertThat(editTab.visible, Eventually(Equals(True)))
127
128- #open toolbar
129+ # open toolbar
130 toolbar = self.shorts_app.main_view.open_toolbar()
131
132- #click on edit topics button
133+ # click on edit topics button
134 toolbar.click_button("edittopicsbutton")
135
136 # verify we are on topic management page
137- topicmanagementpage = self.shorts_app.main_view.get_feed_management_page()
138+ topicmanagementpage = \
139+ self.shorts_app.main_view.get_feed_management_page()
140 self.assertThat(
141 topicmanagementpage.objectName,
142 Eventually(Equals("topicmanagement")))
143
144- #verity Tab is expanded
145+ # verity Tab is expanded
146 editTopic = self.shorts_app.main_view.get_feedlist_topic(test_topic)
147 if editTopic.state != "expanded":
148 self.pointing_device.click_object(editTopic)
149
150- #select feed
151+ # select feed
152 editFeed = self.shorts_app.main_view.get_feedlist_feed(test_topic)
153 self.assertThat(editFeed, NotEquals(None))
154 self.pointing_device.click_object(editFeed)
155
156- #verify we are on edit feed page
157+ # verify we are on edit feed page
158 editfeedpage = self.shorts_app.main_view.get_edit_feed_page()
159 self.assertThat(editfeedpage.visible, Eventually(Equals(True)))
160
161- #change topic from dropdown
162- topicValueselector = self.shorts_app.main_view.get_editfeed_topic_valueselector()
163+ # change topic from dropdown
164+ topicValueselector = \
165+ self.shorts_app.main_view.get_editfeed_topic_valueselector()
166 self.pointing_device.click_object(topicValueselector)
167
168- #click on news topic
169+ # click on news topic
170 topicValueselectorValue = self.shorts_app.main_view. \
171 get_editfeed_valueselector_value("Ubuntu")
172 self.pointing_device.click_object(topicValueselectorValue)
173
174- #verify topic has changed
175+ # verify topic has changed
176 self.assertThat(topicValueselectorValue.text,
177 Eventually(Equals("Ubuntu")))
178

Subscribers

People subscribed via source and target branches