def tear_down(self): """ End and dispose the test """ self._logger.info("-- Tear down starts --") if not self._usb_connected_status: self._io_card.usb_host_pc_connector(True) self._device.connect_board() self._usb_connected_status = True # Enable S3 self._phone_system_api.clear_sleep_mode("s0i3") if self._connected.lower() == "false" \ and self._ssid_list_empty.lower() == "false": self._networking_api.wifi_remove_config(self.FAKE_SSID) LabWifiBase.tear_down(self) self._networking_api.set_wifi_sleep_policy( self._networking_api.WIFI_SLEEP_POLICY["DEFAULT"]) # Relock the phone and remove the backlight on lock self._networking_api.wifi_menu_settings(False) self._phone_system_api.set_phone_lock(1) self._phone_system_api.display_off() # Set display off timeout to its original value if self._original_screen_timeout is not None: self._phone_system_api.\ set_screen_timeout(self._original_screen_timeout) return Global.SUCCESS, "No errors"
def tear_down(self): """ End and dispose the test """ # need to reconnect board before calling tear_down if self._unplugged: self._io_card.usb_host_pc_connector(True) self._unplugged = False # wait x seconds time.sleep(self._device.get_usb_sleep_duration()) if self._disconnected: self._device.connect_board() self._disconnected = False if self._changedroute: # restore original route self._computer.restore_route(self._network, self._hotspot_ip, self._destination, self._netmask, self._iface) self._changedroute = False LabWifiBase.tear_down(self) if self._original_flight_mode != self._networking_api.get_flight_mode( ): self._networking_api.set_flight_mode(self._original_flight_mode) return Global.SUCCESS, "No error"
def tear_down(self): """ End and dispose the test """ LabWifiBase.tear_down(self) return Global.SUCCESS, "No errors"
def tear_down(self): """ End and dispose the test """ LabWifiBase.tear_down(self) # Reconfigure default device state LabWifiKPIBase.tear_down(self) return Global.SUCCESS, "No errors"
def tear_down(self): """ End and dispose the test """ LabWifiBase.tear_down(self) # Set the screen timeout to default time.sleep(self._wait_btwn_cmd) self._phone_system_api.set_screen_timeout(self._current_screen_timeout) return Global.SUCCESS, "No errors"
def tear_down(self): """ End and dispose the test """ try: LabWifiBase.tear_down(self) finally: # Always remove MAC address filter if self._mac_filter != "OFF": self._remove_mac_filter_on_ap() return Global.SUCCESS, "no_error"
def tear_down(self): """ End and dispose the test """ UseCaseBase.tear_down(self) self._ns.init() self._ns.enable_wireless() self._ns.release() LabWifiBase.tear_down(self) return Global.SUCCESS, "No errors"
def tear_down(self): """ End and dispose the test """ # Need to reconnect board to bench Network, before calling tear_down if self._computer: self._computer.connect_from_bench_network() LabWifiBase.tear_down(self) # Ensure USB tethering is OFF self._networking_api.stop_usb_tethering(unplug=True) return Global.SUCCESS, "No error"
def tear_down(self): """ End and dispose the test """ LabWifiBase.tear_down(self) # Restore WIFI sleep policy if self._previous_wifi_sleep_policy is not None and \ self._previous_wifi_sleep_policy != \ self._networking_api.WIFI_SLEEP_POLICY["WHEN_SCREEN_OFF"]: self._networking_api.\ set_wifi_sleep_policy(self._previous_wifi_sleep_policy) # Restore the screen timeout if self._previous_screen_timeout is not None and \ self._previous_screen_timeout != self._screen_timeout: self._phone_system_api.set_screen_timeout(self._previous_screen_timeout) # Make sure that the screen lock ON is disabled self._phone_system_api.display_off() return Global.SUCCESS, "No errors"
def tear_down(self): """ End and dispose the test """ LabWifiBase.tear_down(self) # Initiate connection to the equipment self._ns.init() # Put back the dhcp parameters from the bench configuration if needed self._ns.set_dhcp("off") if self._dhcp_enabled in ("True", "TRUE"): self._ns.set_dhcp("on", self._low_excluded_addr, self._high_excluded_addr, self._dhcp_subnet, self._dhcp_subnet_mask, self._dhcp_lease, self._dhcp_gateway_address) # Close the connection to AP self._ns.release() return Global.SUCCESS, "No errors"