on xenial help sign in
Make it py2 compatible.
5ad6b8dLeo Arias
tests/autopilot/unity8/fixture_setup.py+3−3
@@ -66,14 +66,14 @@ class LaunchDashApp(fixtures.Fixture):
66 process_helpers.stop_job('unity8-dash')
66 process_helpers.stop_job('unity8-dash')
67
67
68
68
69−class IndicatorDisplayRotationLock(fixtures.Fixture):
69+class DisplayRotationLock(fixtures.Fixture):
70
70
71 def __init__(self, enable):
71 def __init__(self, enable):
72− super().__init__()
72+ super(self, DisplayRotationLock).__init__()
73 self.enable = enable
73 self.enable = enable
74
74
75 def setUp(self):
75 def setUp(self):
76− super().setUp()
76+ super(self, DisplayRotationLock).setUp()
77 original_state = self._is_rotation_lock_enabled()
77 original_state = self._is_rotation_lock_enabled()
78 if self.enable != original_state:
78 if self.enable != original_state:
79 self.addCleanup(self._set_rotation_lock, original_state)
79 self.addCleanup(self._set_rotation_lock, original_state)
tests/autopilot/unity8/indicators/tests/test_indicators.py+1−1
@@ -112,7 +112,7 @@ class DisplayIndicatorTestCase(IndicatorTestCase):
112 def test(self):
112 def test(self):
113 display_indicator = indicators.DisplayIndicator(self.main_window)
113 display_indicator = indicators.DisplayIndicator(self.main_window)
114 display_indicator_page = display_indicator.open()
114 display_indicator_page = display_indicator.open()
115− fixture = fixture_setup.IndicatorDisplayRotationLock(False)
115+ fixture = fixture_setup.DisplayRotationLock(False)
116
116
117 display_indicator_page.unlock_rotation()
117 display_indicator_page.unlock_rotation()
118 self.assertEqual(fixture._is_rotation_lock_enabled(), False)
118 self.assertEqual(fixture._is_rotation_lock_enabled(), False)