def test_create_qualifier(self): qual = Qualifier() qual.code = "ABC123" qual.description = "This is a test" self.cv_service.create_qualifier(qual) assert qual.id is not None
def create_qualifier(self, code, description): qualifier = Qualifier() qualifier.code = code qualifier.description = description self._edit_session.add(qualifier) self._edit_session.commit()
def create_qualifer(self, code, description): serv_man = ServiceManager() cv_service = serv_man.get_cv_service() q = Qualifier() q.code = code q.description = description cv_service.create_qualifer(q) return q.id
def test_get_qualifiers(self): assert self.cv_service.get_qualifiers() == [] qual = Qualifier() qual.code = "ABC123" qual.description = "This is a test" self.cv_service.create_qualifier(qual) db_qual = self.cv_service.get_qualifiers()[0] assert qual.id == db_qual.id
def OnBtnOKButton(self, event): #new if self.splitter.IsSplit(): q = Qualifier() q.code = self.txtCode.GetValue() q.description = self.txtDesc.GetValue() self.cv_service.create_qualifier(q) self.qid = q.id else: self.qid = self.qualchoices[self.cbQualif.GetValue()] event.Skip() self.Close()
def OnBtnOKButton(self, event): #new if self.splitter.IsSplit(): q=Qualifier() q.code=self.txtCode.GetValue() q.description=self.txtDesc.GetValue() self.cv_service.create_qualifier(q) self.qid=q.id else: self.qid = self.qualchoices[self.cbQualif.GetValue()] event.Skip() self.Close()