コード例 #1
0
ファイル: test_dao.py プロジェクト: jaunis/xivo-dao
    def test_get_id_by_name(self):
        profile_row1 = CtiProfileSchema(id=1, name='Profil 01')
        profile_row2 = CtiProfileSchema(id=2, name='Profil 02')
        self.add_me(profile_row1)
        self.add_me(profile_row2)

        result = dao.get_id_by_name('Profil 02')

        assert_that(result, equal_to(2))
コード例 #2
0
ファイル: test_dao.py プロジェクト: jlebleu/xivo-dao
    def test_get_id_by_name(self):
        profile_row1 = CtiProfileSchema(id=1, name='Profil 01')
        profile_row2 = CtiProfileSchema(id=2, name='Profil 02')
        self.add_me(profile_row1)
        self.add_me(profile_row2)

        result = dao.get_id_by_name('Profil 02')

        assert_that(result, equal_to(2))
コード例 #3
0
def get_id_with_name(cti_profile_name):
    return cti_profile_dao.get_id_by_name(cti_profile_name)