def create_assessment(self, assessment): """ To create Assessment :param assessment: Assessment """ raw_assessment = self.http.post('/Assessment', assessment) return Schemas.Assessment(assessment=raw_assessment)
def get_assessment(self, assessment): """ To get Assessment by id """ response = self.http.get('/Assessment/' + str(assessment)) assessment = Schemas.Assessment(assessment=response) return assessment
def get_assessments(self): """ To get list of Assessments """ assessments = [] response = self.http.get('/Assessment') for assessment in response: assessments.append(Schemas.Assessment(assessment=assessment)) return assessments
def off_assessment(self, assessment): """ To turn off assessment :param assessment: string """ assessmentObj = self.get_assessment(assessment) url = '/datastream/' + str(assessmentObj.get_datastream() ) + '/off?assessment=' + str(assessment) response = self.http.post(url, "") return Schemas.Assessment(assessment=response[0])