on xenial help sign in
Per elopio's suggestion, combine get_applications length and visible tests.
commit23b32286575d8c9473277173fe5b8bdbff1d346c authorAllan LeSage <allan.lesage@canonical.com> dateWed 2 Apr 2014, 17:52 (13 years ago) parent3599a75
1 file changed+2−16
tests/autopilot/unity8/shell/tests/test_emulators.py+2−16
tests/autopilot/unity8/shell/tests/test_emulators.py+2−16
@@ -165,27 +165,13 @@ class DashAppsEmulatorTestCase(DashBaseTestCase):
165165 self.assertEqual(
166166 'No category found with name unexisting category', str(exception))
167167
168− def test_get_applications_should_return_list_with_names(self):
168+ def test_get_applications_should_return_correct_applications(self):
169169 category = '2'
170170 expected_apps_count = self._get_number_of_application_slots(category)
171171 expected_applications = self.available_applications[
172172 :expected_apps_count]
173−
174− applications = self.applications_scope.get_applications(category)
175−
176− self.assertThat(applications, HasLength(expected_apps_count))
177− for expected in expected_applications:
178− self.assertThat(applications, Contains(expected))
179−
180− def test_get_applications_list_matches_visible_ordering(self):
181− category = '2'
182− expected_apps_count = self._get_number_of_application_slots(category)
183− expected_application_titles = self.available_applications[
184− :expected_apps_count]
185173 applications = self.applications_scope.get_applications(category)
186− for card_num in range(len(applications)):
187− self.assertEqual(expected_application_titles[card_num],
188− applications[card_num])
174+ self.assertEqual(expected_applications, applications)
189175
190176 def _get_number_of_application_slots(self, category):
191177 category_element = self.applications_scope._get_category_element(