def test_servicestate(self): s = db.ServiceStates() s.type = 0 s.status = 0 s = db.ServiceStates(s) assert s.type == 0 assert s.status == 0
def test_servicestate(self): s = db.ServiceStates() s.type = 0 s.status = 0 s = db.ServiceStates(s) self.assertEqual(s.type, 0) self.assertEqual(s.status, 0)
def set_service_status(dbs, service, status): '''Update the status of a particular service in the database. ''' srv = db.ServiceStates() srv.type = service srv.status = status dbs.merge(srv) dbs.commit()