def test_del_property(): """Attempts to delete a valid property""" contents = ("[Info]\n" "sdk = 23") testutils.deploy_config_raw(contents) prop.del_prop('info', 'sdk') testutils.undeploy() return 0
def test_del_property_casing(): """Delete a prop with alternating casing""" sdk = '23' contents = ("[Info]\n" "sdk = %s" % sdk) testutils.deploy_config_raw(contents) prop.del_prop('info', 'sdk') testutils.undeploy() return 0
def do_remove(self): """Uninstall the dtf client""" log.i(self.name, "Waiting for device to be connected...") self.adb.wait_for_device() log.i(self.name, "Removing dtf client...") self.adb.uninstall(DTF_CLIENT) prop.del_prop("Info", "busybox") log.i(self.name, "dtf client removed!") return 0
def do_remove(self): """Uninstall the dtf client""" log.i(self.name, "Waiting for device to be connected...") self.adb.wait_for_device() log.i(self.name, "Removing dtf client...") self.adb.uninstall(DTF_CLIENT) prop.del_prop('Info', 'busybox') log.i(self.name, "dtf client removed!") return 0
def test_del_empty_config(): """Attempts to delete a property without a valid config""" testutils.deploy_config_raw("") assert prop.del_prop('info', 'sdk') != 0 testutils.undeploy() return 0
def test_del_property_invalid(): """Attempts to delete a property that doesnt exist""" contents = ("[Info]\n" "vmtype = 64") testutils.deploy_config_raw(contents) assert prop.del_prop('info', 'sdk') != 0 testutils.undeploy() return 0
def do_del(self, args): """Delete a property""" rtn = 0 if len(args) != 2: log.e(self.name, "A section and property must be specified.") rtn = self.usage() else: section = args[0] prop_name = args[1] rtn = del_prop(section, prop_name) return rtn