Пример #1
0
class Suspend(UIATestBase):
    """
    @summary: Test suspend and wakeup
    """
    def setUp(self):
        super(Suspend, self).setUp()
        self._test_name = __name__
        print
        print "[Setup]: %s" % self._test_name
        self.systemui = SystemUI()

    def tearDown(self):
        super(Suspend, self).tearDown()
        print "[Teardown]: %s" % self._test_name

    def testSuspend(self):
        """
        This test case is to test suspend and wakeup

        Test Case Step:
        1. Make the device sleep for 60s
        2. Make the device wakeup
        """
        print "[RunTest]: %s" % self.__str__()

        self.systemui.suspend_wakeup()
Пример #2
0
class TestBackLight(UIATestBase):
    def setUp(self):
        super(TestBackLight, self).setUp()
        self.systemui = SystemUI()

    def tearDown(self):
        super(TestBackLight, self).tearDown()
        self.systemui = None

    def testBackLightSwitch(self):
        self.systemui.suspend_wakeup()

    def test_Backlight_SuspendResume(self):
        self.systemui.power_off_device(sleepTime=3)
        self.systemui.power_on_device(sleepTime=3)