Esempio n. 1
0
    def tear_down(self):

        # Disconnect and clear WiFi networks
        if self._connection_to_share == "WIFI":
            self._networking_api.wifi_remove_config("all")
            self._networking_api.set_wifi_power("off")

        LiveBTBase.tear_down(self)

        result, output = Global.SUCCESS, ""
        return result, output
    def tear_down(self):
        """
        Finish the test and clear environment
        """

        # Call UseCase base tear_down function
        LiveBTBase.tear_down(self)

        # Disable WiFi
        self._networking_api.set_wifi_power(0)

        return Global.SUCCESS, "No errors"
Esempio n. 3
0
    def tear_down(self):
        """
        End and dispose the test
        """
        self._bt_api.unpair_bt_device(self._hsaddr)

        LiveBTBase.tear_down(self)

        time.sleep(self._wait_btwn_cmd)

        # Power off headset
        self._bt_headset.set_power(False)

        return Global.SUCCESS, "No errors"
Esempio n. 4
0
    def tear_down(self):
        """
        End and dispose the test
        """
        LiveBTBase.tear_down(self)

        time.sleep(self._wait_btwn_cmd)

        self._logger.info("Set original BT mode: " +
                          str(self._original_bt_mode))
        self._bt_api.set_bt_power(self._original_bt_mode)
        if self._original_bt_mode != self._bt_api.get_bt_power_status_eot():
            msg = "Set BT original mode failure"
            self._logger.error(msg)
            raise DeviceException(DeviceException.OPERATION_FAILED, msg)

        return Global.SUCCESS, "No errors"
    def tear_down(self):
        """
        End and dispose the test
        """
        LiveBTBase.tear_down(self)

        time.sleep(self._wait_btwn_cmd)

        # Recover to initial flight mode
        self._logger.info("Set PHONE2 to original flight mode")
        self._networking_api2.set_flight_mode(self._original_flight_mode2)
        time.sleep(self._wait_btwn_cmd)

        self._logger.info("Close phone 2 adapter devices")
        self._bt_api2.set_bt_power("off")
        time.sleep(self._wait_btwn_cmd)

        return Global.SUCCESS, "No errors"