def test_update_none(self): self.user = Service() self.user.admin = True self.user.name = 'John' self.user.password = '******' self.user.create() self.user = Service.getbyuuid(self.user._uuid) self.user.name = 'Kalle' self.user.update() self.assertTrue(self.user in Service.getall())
def update_service(uuid, service, name, password, note): serv = Service.getbyuuid(uuid) serv.service = service serv.name = name serv.password = password serv.note = note if serv.valid(): serv.update() return True else: return False
def get_service_by_uuid(uuid): """Get service by uuid.""" return Service.getbyuuid(uuid)
def delete_service(uuid): """Delete service.""" serv = Service.getbyuuid(uuid) serv.delete() return True
def get_service_by_uuid(uuid): return Service.getbyuuid(uuid)
def delete_service(uuid): serv = Service.getbyuuid(uuid) serv.delete() return True