コード例 #1
0
    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
コード例 #2
0
    def create_qualifier(self, code, description):
        qualifier = Qualifier()
        qualifier.code = code
        qualifier.description = description

        self._edit_session.add(qualifier)
        self._edit_session.commit()
コード例 #3
0
	def create_qualifier(self, code, description):
		qualifier = Qualifier()
		qualifier.code = code
		qualifier.description = description

		self._edit_session.add(qualifier)
		self._edit_session.commit()
コード例 #4
0
ファイル: test_cv_service.py プロジェクト: LejoFlores/ODM2
    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
コード例 #5
0
 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
コード例 #6
0
 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
コード例 #7
0
    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
コード例 #8
0
ファイル: test_cv_service.py プロジェクト: LejoFlores/ODM2
    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
コード例 #9
0
    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()
コード例 #10
0
    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()