Beispiel #1
0
 def test_validate_edition(self, patch_get_user, patch_get_profile):
     user_cti_profile = UserCtiProfile(user_id=1, cti_profile_id=2, enabled=True)
     validator.validate_edit(user_cti_profile)
Beispiel #2
0
    def test_validate_edition_null_profile(self, patch_get_user, patch_get_cti_profile):
        user_cti_profile = UserCtiProfile(user_id=1, cti_profile_id=None, enabled=True)
        validator.validate_edit(user_cti_profile)

        self.assertFalse(patch_get_cti_profile.called, "CTI profile dao should not have been called")
Beispiel #3
0
def edit(user_cti_profile):
    validator.validate_edit(user_cti_profile)
    dao.edit(user_cti_profile)
    notifier.edited(user_cti_profile)