def test_get(self): profile_row = CtiProfileSchema(id=1, name='Profil 01') self.add_me(profile_row) result = dao.get(1) assert_that(result.id, equal_to(1)) assert_that(result.name, equal_to('Profil 01'))
def _validate_cti_profile_exists(user_cti_profile): try: cti_profile_dao.get(user_cti_profile.cti_profile_id) except ElementNotExistsError: raise NonexistentParametersError( cti_profile=user_cti_profile.cti_profile_id)
def _validate_cti_profile_exists(user_cti_profile): try: cti_profile_dao.get(user_cti_profile.cti_profile_id) except ElementNotExistsError: raise NonexistentParametersError(cti_profile=user_cti_profile.cti_profile_id)
def get(profile_id): return dao.get(profile_id)