예제 #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
    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)